Re: Emit a warning if the extension's GUC is set incorrectly
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: peter.eisentraut@enterprisedb.com
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
Shinya11.Kato@oss.nttdata.com,
masao.fujii@oss.nttdata.com, bharath.rupireddyforpostgres@gmail.com,
daniel@yesql.se, pgsql-hackers@postgresql.org
Date: 2021-12-27T20:48:43Z
Lists: pgsql-hackers
I wrote: > Concretely, I think we should do the attached, which removes much of > 75d22069e and does the check at the point of placeholder creation. I pushed that, and along the way moved the test case to be beside the existing tests concerning custom GUC names, rather than appended at the end of guc.sql as it had been. That turns out to make the buildfarm very unhappy. I had not thought to test that change with "force_parallel_mode = regress"; but with that on, we can see that the warning (or now error) is reported each time a parallel worker is launched, if the parent process contains a bogus placeholder. So that accidentally unveiled another deficiency in the design of the original patch --- we surely don't want that to happen. As a stopgap to turn the farm green again, I am going to revert 75d22069e as well as my followup patches. If we don't want to give up on that idea altogether, we have to find some way to suppress the chatter from parallel workers. I wonder whether it would be appropriate to go further than we have, and actively delete placeholders that turn out to be within an extension's reserved namespace. The core issue here is that workers don't necessarily set GUCs and load extensions in the same order that their parent did, so if we leave any invalid placeholders behind after reserving an extension's prefix, we're risking issues during worker start. regards, tom lane
Commits
-
Disallow setting bogus GUCs within an extension's reserved namespace.
- 88103567cb8f 15.0 landed
-
Revert changes about warnings/errors for placeholders.
- cab5b9ab2c06 15.0 landed
-
Rename EmitWarningsOnPlaceholders() to MarkGUCPrefixReserved().
- 5609cc01c69b 15.0 landed
-
Rethink handling of settings with a prefix reserved by an extension.
- 2ed8a8cc5b63 15.0 landed
-
Add missing EmitWarningsOnPlaceholders() calls.
- 1fada5d81e67 15.0 landed
-
Add EmitWarningsOnPlaceholders calls to contrib modules that are likely to
- da2c1b8a27af 8.4.0 cited