Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag

Поиск
Список
Период
Сортировка
От Drouvot, Bertrand
Тема Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag
Дата
Msg-id 2b530754-56c0-4272-a326-11d30a0bca55@gmail.com
обсуждение исходный текст
Ответ на Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag  ("Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>)
Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi,

On 10/10/23 7:58 AM, Michael Paquier wrote:
> On Tue, Oct 10, 2023 at 06:57:05AM +0200, Drouvot, Bertrand wrote:
>> Please find attached v9 (v8 rebase due to f483b2090).
> 
> 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.

> 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).

> 
> It looks like 0002 had the same issues as f483b209: the worker that
> could not be started because of the login restriction could be
> detected as stopped by worker_spi_launch(), causing the script to fail
> hard.
> 
> 0002 is basically your v9, able to work with the refactoring from
> 0001.

Thanks!

  #define INIT_PG_OVERRIDE_ALLOW_CONNS   0x0002
+#define INIT_PG_BYPASS_ROLE_LOGIN              0x0004

Any reason why INIT_PG_BYPASS_ROLE_LOGIN is not 0x0003?

Except that it does look good to me.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Pre-proposal: unicode normalized text
Следующее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag