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

expected/pathman_calamity.out

Lines 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

Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy