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

From Maciek Sakrejda
Subject Re: warn if GUC set to an invalid shared library
Date
Msg-id CAOtHd0BTNd_VK9cWOvtbArgPS26+bzTVqSedU7uxUSGrXT_hqA@mail.gmail.com
Whole thread Raw
In response to Re: warn if GUC set to an invalid shared library  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
On Wed, Feb 2, 2022 at 7:39 AM David G. Johnston <david.g.johnston@gmail.com> wrote:
I would at least consider having the UX go something like:

postgres=# ALTER SYSTEM SET shared_preload_libraries = not_such_library;
ERROR: <paraphrase: your system will not reboot in its current state as that library is not present>.
HINT: to bypass the error please add FORCE before SET
postgres=# ALTER SYSTEM FORCE SET shared_preload_libraries = no_such_library;
NOTICE: Error suppressed while setting shared_preload_libraries.

That is, have the user express their desire to leave the system in a precarious state explicitly before actually doing so.

While I don't have a problem with that behavior, given that there are currently no such facilities for asserting "yes, really" with ALTER SYSTEM, I don't think it's worth introducing that just for this patch. A warning seems like a reasonable first step. This can always be expanded later. I'd rather see a warning ship than move the goalposts out of reach.

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Design of pg_stat_subscription_workers vs pgstats
Next
From: Justin Pryzby
Date:
Subject: Re: do only critical work during single-user vacuum?