Re: warn if GUC set to an invalid shared library

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Cary Huang <cary(dot)huang(at)highgo(dot)ca>
Cc: 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-01-29 00:09:12
Message-ID: 20220129000912.GJ23027@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for loooking

On Fri, Jan 28, 2022 at 11:36:20PM +0000, Cary Huang wrote:
> This is fine as this is what these patches are aiming to provide. However, when I try to restart the server, it fails to start because abc.so and xyz.so do not exist. Setting the parameters "local_preload_libraries" and "local_preload_libraries" to something else in postgresql.conf does not seem to take effect either.
> It still complains shared_preload_libraries abc.so does not exist even though I have already set shared_preload_libraries to something else in postgresql.conf. This seems a little strange to me

Could you show exactly what you did and the output ?

The patches don't entirely prevent someone from putting the server config into
a bad state. It only aims to tell them if they've done that, so they can fix
it, rather than letting someone (else) find the error at some later (probably
inconvenient) time.

ALTER SYSTEM adds config into postgresql.auto.conf. If you stop the server
after adding bad config there (after getting a warning), the server won't
start. Once the server is off, you have to remove it manually.

The goal of the patch is to 1) warn someone that they've put a bad config in
place, so they don't leave it there; and, 2) if the server fails to start for
such a reason, provide a CONTEXT line to help them resolve it quickly.

Maybe you know all that and I didn't understand what you're saying.

--
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-01-29 00:31:10 Re: row filtering for logical replication
Previous Message James Coleman 2022-01-28 23:43:57 Re: Add last commit LSN to pg_last_committed_xact()