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: Maciek Sakrejda <m.sakrejda@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>, Robert Haas <robertmhaas@gmail.com>,
"David G. Johnston" <david.g.johnston@gmail.com>,
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-03-23T19:02:23Z
Lists: pgsql-hackers
Maciek Sakrejda <m.sakrejda@gmail.com> writes: > In v4, the message looks fine to me for shared_preload_libraries > (except there is a doubled "is"). However, I also get the message for > a simple SET with local_preload_libraries: > postgres=# set local_preload_libraries=xyz; > WARNING: could not access file "xyz" > HINT: The server will fail to start with the existing configuration. > If it is is shut down, it will be necessary to manually edit the > postgresql.auto.conf file to allow it to start. > SET I agree with Maciek's concerns about these HINTs being emitted inappropriately, but I also have a stylistic gripe: they're only halfway hints. Given that we fix things so they only print when they should, the complaint about the server not starting is not a hint, it's a fact, which per style guidelines means it should be errdetail. So I think this ought to look more like WARNING: could not access file "xyz" DETAIL: The server will fail to start with this setting. HINT: If the server is shut down, it will be necessary to manually edit the postgresql.auto.conf file to allow it to start again. I adjusted the wording a bit too --- YMMV, but I think my text is clearer. regards, tom lane