Skip to content

Commit 02e0db7

Browse files
committed
Check readiness in add_to_pathman_config
1 parent d791f2d commit 02e0db7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Diff for: expected/pathman_calamity.out

+1-1
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 */

Diff for: src/pl_funcs.c

+3
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)