Re: warn if GUC set to an invalid shared library

From: Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Justin Pryzby <justin(at)telsasoft(dot)com>
Subject: Re: warn if GUC set to an invalid shared library
Date: 2022-02-04 04:36:27
Message-ID: CAOtHd0BTNd_VK9cWOvtbArgPS26+bzTVqSedU7uxUSGrXT_hqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 2, 2022 at 7:39 AM David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2022-02-04 04:44:07 Re: do only critical work during single-user vacuum?
Previous Message Amit Kapila 2022-02-04 03:53:06 Re: Design of pg_stat_subscription_workers vs pgstats