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