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

From Andres Freund
Subject Re: Allow workers to override datallowconn
Date
Msg-id 20180222191734.752kg2ftf7jassqr@alap3.anarazel.de
Whole thread Raw
In response to Allow workers to override datallowconn  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Allow workers to override datallowconn  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Hi,

On 2018-02-22 19:01:35 +0100, Magnus Hagander wrote:
> In working on the checksumhelper patch, we came across wanting a background
> worker to be allowed to bypass datallowconn for a database. Right now we
> didn't take care of that, and just said "you have to ALTER TABLE" first.

I suspect you mean ALTER DATABASE, rather than table? ;)

I wonder if we don't want this to be a slightly more generic
facility. E.g. pg_upgrade has the same need. Perhaps we whould
superuser-only connection-establishment only option that allows
connecting to a database even if datallowconn = false, and then
additionally allow to pass connection arguments to
BackgroundWorkerInitializeConnection()? It seems fairly reasonable to
want to establish different GUCs via normal GUC-y mechanisms when
establishing a bgworker connection...

Regards,

Andres


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Allow workers to override datallowconn
Next
From: Simon Riggs
Date:
Subject: Re: Allow workers to override datallowconn