Re: warn if GUC set to an invalid shared library - Mailing list pgsql-hackers

From Tom Lane
Subject Re: warn if GUC set to an invalid shared library
Date
Msg-id 729940.1658516423@sss.pgh.pa.us
Whole thread Raw
In response to Re: warn if GUC set to an invalid shared library  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: warn if GUC set to an invalid shared library
List pgsql-hackers
Justin Pryzby <pryzby@telsasoft.com> writes:
> On Fri, Jul 22, 2022 at 01:53:21PM -0400, Tom Lane wrote:
>> This indicates that the warning is being issued in the wrong place.
>> It's okay if it comes out during ALTER SYSTEM.  It's not okay if it
>> comes out during server start; then it's just an annoyance.

> The previous patch version checked if (!IsUnderPostmaster()) before warning.
> Is there a better way ?

> ALTER SYSTEM uses PGC_S_FILE, the same as during startup..

Shouldn't you be doing this when the source is PGC_S_TEST, instead?
That's pretty much what it's for.  See check_default_table_access_method
and other examples.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS
Next
From: Justin Pryzby
Date:
Subject: Re: warn if GUC set to an invalid shared library