Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag
Date
Msg-id ZSXdsqU0QlhYrw-r@paquier.xyz
Whole thread Raw
In response to Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Responses Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag
List pgsql-hackers
On Tue, Oct 10, 2023 at 09:12:49AM +0200, Drouvot, Bertrand wrote:
> On 10/10/23 7:58 AM, Michael Paquier wrote:
>> I was looking at v8 just before you sent this v9, and still got
>> annoyed by the extra boolean argument added to InitPostgres().
>
> Arf, I did not look at it as I had in mind to look at it once
> this one is in.

No problem.  I'm OK to do it.

>> So
>> please let me propose to bite the bullet and refactor that, as of the
>> 0001 attached that means less diff footprints in all the callers of
>> InitPostgres() (I am not wedded to the flag names).
>
> Thanks for having looked at it!
>
> +       bits32          init_flags = 0; /* never honor session_preload_libraries */
>
> Also a few word about datallowconn in the comment? (as the flag deals with both).

I am not sure that this is necessary in the code paths of
BackgroundWorkerInitializeConnectionByOid() and
BackgroundWorkerInitializeConnection() as datallowconn is handled a
few lines down.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Jean-Christophe Arnu
Date:
Subject: Re: FDW pushdown of non-collated functions
Next
From: Andres Freund
Date:
Subject: Re: Lowering the default wal_blocksize to 4K