Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 02e0db7

Browse filesBrowse files
committed
Check readiness in add_to_pathman_config
1 parent d791f2d commit 02e0db7
Copy full SHA for 02e0db7

File tree

2 files changed

+4
-1
lines changed
Filter options

2 files changed

+4
-1
lines changed

‎expected/pathman_calamity.out

Copy file name to clipboardExpand all lines: expected/pathman_calamity.out
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ SHOW pg_pathman.enable;
10051005
(1 row)
10061006

10071007
SELECT add_to_pathman_config('calamity.survivor', 'val', '10'); /* not ok */
1008-
ERROR: pg_pathman is not initialized yet
1008+
ERROR: pg_pathman is disabled
10091009
SELECT * FROM pathman_partition_list; /* not ok */
10101010
ERROR: pg_pathman is not initialized yet
10111011
SELECT get_part_range('calamity.survivor', 0, NULL::INT); /* not ok */

‎src/pl_funcs.c

Copy file name to clipboardExpand all lines: src/pl_funcs.c
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,9 @@ add_to_pathman_config(PG_FUNCTION_ARGS)
740740

741741
PathmanInitState init_state;
742742

743+
if (!IsPathmanReady())
744+
elog(ERROR, "pg_pathman is disabled");
745+
743746
if (!PG_ARGISNULL(0))
744747
{
745748
relid = PG_GETARG_OID(0);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.