Re: [PATCH] Expose port->authn_id to extensions and triggers

From: "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Joe Conway <mail(at)joeconway(dot)com>
Cc: Jacob Champion <jchampion(at)timescale(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "sfrost(at)snowman(dot)net" <sfrost(at)snowman(dot)net>, "rjuju123(at)gmail(dot)com" <rjuju123(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>
Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers
Date: 2022-08-08 10:43:14
Message-ID: d25a412e-9686-d37f-3bd1-63b821f67a51@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Drouvot, Bertrand 2022-08-08 10:51:20 Re: Patch proposal: New hooks in the connection path
Previous Message vignesh C 2022-08-08 09:23:28 Re: Skipping schema changes in publication