Re: Allow workers to override datallowconn - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Allow workers to override datallowconn
Date
Msg-id 635.1519331090@sss.pgh.pa.us
Whole thread Raw
In response to Re: Allow workers to override datallowconn  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Allow workers to override datallowconn  (Andres Freund <andres@anarazel.de>)
Re: Allow workers to override datallowconn  (Andres Freund <andres@anarazel.de>)
Re: Allow workers to override datallowconn  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> I hacked up an attempt to do this. It does seem to work in the very simple
> case, but it does requiring changing the order in InitPostgres() to load
> the startup packet before validating those.

I doubt that's safe.  It requires, to name just one thing, an assumption
that no processing done in process_startup_options has any need to know
the database encoding, which is established by CheckMyDatabase.  Thus
for instance, if any GUC settings carried in the startup packet include
non-ASCII characters, the wrong things will happen.

You could possibly make it work with more aggressive refactoring, but
I remain of the opinion that this is a fundamentally bad idea anyhow.
A GUC of this kind is just ripe for abuse, and I don't think it's solving
any problem we really need solved.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Online enabling of checksums
Next
From: Magnus Hagander
Date:
Subject: Re: Online enabling of checksums