Re: [PATCH] Expose port->authn_id to extensions and triggers - Mailing list pgsql-hackers

From Drouvot, Bertrand
Subject Re: [PATCH] Expose port->authn_id to extensions and triggers
Date
Msg-id d25a412e-9686-d37f-3bd1-63b821f67a51@amazon.com
Whole thread Raw
In response to Re: [PATCH] Expose port->authn_id to extensions and triggers  (Michael Paquier <michael@paquier.xyz>)
Responses Re: [PATCH] Expose port->authn_id to extensions and triggers
List pgsql-hackers
Hi,

On 8/7/22 9:41 AM, Michael Paquier wrote:
> Anyway, I was looking at Bertrand's patch, and I can see that it is
> doing nothing to move away the connection information that we have in
> Port away to a different structure passed down to the parallel
> workers,

Thanks for looking at it!

That's right. The main reason is that in the v2-0003 SYSTEM_USER patch 
what is passed down to the parallel workers is not Port->authn_id but a 
new "SystemUser" (defined in miscinit.c with CurrentUserId and friends).

>   which is what I understand is a cleanup worth on its own
> based on the discussion of this thread.  Hence, I still see a good
> argument for the introduction of ClientConnectionInfo that gets passed
> down to the workers.

I agree that it could it be useful too.

> Based on that, I think that we'd better finish
> v11-0002 (only ClientConnectionInfo, no SQL interface)

I agree.

>   as a first step
> to build for the next ones, with authn being the first piece of
> information given to the workers.  With a separate structure, the
> auth_method can also be a second member in ClientConnectionInfo,
> completing what would be needed to build SYSTEM_USER as the workers
> would have access to it.

but I'm not sure we should do it as a first step (given the fact that 
this is not Port->authn_id that is passed down to the parallel workers 
in the SYSTEM_USER patch).

What do you think about working on both (aka a) v11-002 only 
ClientConnectionInfo and b) SYSTEM_USER) in parallel?

Thanks

-- 
Bertrand Drouvot
Amazon Web Services: https://aws.amazon.com




pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Skipping schema changes in publication
Next
From: "Drouvot, Bertrand"
Date:
Subject: Re: Patch proposal: New hooks in the connection path