From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com> |
Cc: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag |
Date: | 2023-10-11 03:40:28 |
Message-ID: | ZSYZLPpOubzCh_7o@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Oct 11, 2023 at 08:26:42AM +0900, Michael Paquier wrote:
> 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.
Applied 0001 for now.
> I am not sure that this is necessary in the code paths of
> BackgroundWorkerInitializeConnectionByOid() and
> BackgroundWorkerInitializeConnection() as datallowconn is handled a
> few lines down.
/* flags for InitPostgres() */
#define INIT_PG_LOAD_SESSION_LIBS 0x0001
#define INIT_PG_OVERRIDE_ALLOW_CONNS 0x0002
+#define INIT_PG_BYPASS_ROLE_LOGIN 0x0004
In 0002, I am not sure that this is the best name for this new flag.
There is consistency with the bgworker part, for sure, but shouldn't
we name that OVERRIDE_ROLE_LOGIN instead in miscadmin.h?
--
Michael
Attachment | Content-Type | Size |
---|---|---|
v11-0002-Allow-background-workers-to-bypass-login-check.patch | text/x-diff | 9.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | tender wang | 2023-10-11 03:44:15 | Re: Problem, partition pruning for prepared statement with IS NULL clause. |
Previous Message | Noah Misch | 2023-10-11 03:40:26 | Re: REL_15_STABLE: pgbench tests randomly failing on CI, Windows only |