summaryrefslogtreecommitdiff
path: root/contrib/sepgsql
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-02-21 14:10:15 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2022-02-21 14:10:43 -0500
commit88103567cb8fa5be46dc9fac3e3b8774951a2be7 (patch)
tree731532cb1686190be3f48abe50fef3c2f7ee4214 /contrib/sepgsql
parent2776922201f751e3202a713b61d97fe4e44a8440 (diff)
downloadpostgresql-88103567cb8fa5be46dc9fac3e3b8774951a2be7.tar.gz
Disallow setting bogus GUCs within an extension's reserved namespace.
Commit 75d22069e tried to throw a warning for setting a custom GUC whose prefix belongs to a previously-loaded extension, if there is no such GUC defined by the extension. But that caused unstable behavior with parallel workers, because workers don't necessarily load extensions and GUCs in the same order their leader did. To make that work safely, we have to completely disallow the case. We now actually remove any such GUCs at the time of initial extension load, and then throw an error not just a warning if you try to add one later. While this might create a compatibility issue for a few people, the improvement in error-detection capability seems worth it; it's hard to believe that there's any good use-case for choosing such GUC names. This also un-reverts 5609cc01c (Rename EmitWarningsOnPlaceholders() to MarkGUCPrefixReserved()), since that function's old name is now even more of a misnomer. Florin Irion and Tom Lane Discussion: https://postgr.es/m/1902182.1640711215@sss.pgh.pa.us
Diffstat (limited to 'contrib/sepgsql')
-rw-r--r--contrib/sepgsql/hooks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/sepgsql/hooks.c b/contrib/sepgsql/hooks.c
index d71c802106..97e61b8043 100644
--- a/contrib/sepgsql/hooks.c
+++ b/contrib/sepgsql/hooks.c
@@ -455,7 +455,7 @@ _PG_init(void)
NULL,
NULL);
- EmitWarningsOnPlaceholders("sepgsql");
+ MarkGUCPrefixReserved("sepgsql");
/* Initialize userspace access vector cache */
sepgsql_avc_init();