Re: warn if GUC set to an invalid shared library
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Maciek Sakrejda <m.sakrejda@gmail.com>,
Robert Haas <robertmhaas@gmail.com>,
"David G. Johnston" <david.g.johnston@gmail.com>,
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2022-07-22T19:00:23Z
Lists: 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