From: Drouvot, Bertrand <bdrouvot@amazon.com>
To: Michael Paquier <michael@paquier.xyz>
To: Joe Conway <mail@joeconway.com>
Cc: Jacob Champion <jchampion@timescale.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: sfrost@snowman.net <sfrost@snowman.net>
Cc: rjuju123@gmail.com <rjuju123@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: andres@anarazel.de <andres@anarazel.de>
Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers
Date: Mon, 8 Aug 2022 12:43:14 +0200
Message-ID: <d25a412e-9686-d37f-3bd1-63b821f67a51@amazon.com> (raw)
In-Reply-To: <Yu9slCBp0WWD4Qx1@paquier.xyz>
References: <CAAWbhmj340fKUMO-a=3BZKw4RfvWroz_V=E_9bowoxeAxFkCSQ@mail.gmail.com>
<CA+Tgmoa2ed6X+qDKvs6NZ=h0hQ2OJjgnmoBF2LwRagE6R5qAAw@mail.gmail.com>
<CAAWbhmhfzt+hYiTXi3f0V_E5E+E_mmzd_x+p9zjs_NvBpJ36pA@mail.gmail.com>
<CA+TgmoZmRAkOgNzSqRxzJ=Kok_NYHZ57X2ZKRh=cfoCukp4f_Q@mail.gmail.com>
<CAAWbhmjPu2VNS8MhwDp=+hu61EsJ3zf_rTRtyZ8Qw08eAhg_pA@mail.gmail.com>
<f98e0b81-96cb-b0d8-c483-e99563cc44b4@amazon.com>
<3b678314-054a-6119-b373-4574067f404e@timescale.com>
<cc8aaffb-1008-eaf6-090e-2461cbe6e1cf@amazon.com>
<Yu4JhEvh1V0sGWXv@paquier.xyz>
<af85ae52-de60-6a98-d69e-7d410aee752d@joeconway.com>
<Yu9slCBp0WWD4Qx1@paquier.xyz>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: bdrouvot@amazon.com, michael@paquier.xyz, mail@joeconway.com, jchampion@timescale.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, sfrost@snowman.net, rjuju123@gmail.com, andres@anarazel.de
Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers
In-Reply-To: <d25a412e-9686-d37f-3bd1-63b821f67a51@amazon.com>
References: <CAAWbhmj340fKUMO-a=3BZKw4RfvWroz_V=E_9bowoxeAxFkCSQ@mail.gmail.com> <CA+Tgmoa2ed6X+qDKvs6NZ=h0hQ2OJjgnmoBF2LwRagE6R5qAAw@mail.gmail.com> <CAAWbhmhfzt+hYiTXi3f0V_E5E+E_mmzd_x+p9zjs_NvBpJ36pA@mail.gmail.com> <CA+TgmoZmRAkOgNzSqRxzJ=Kok_NYHZ57X2ZKRh=cfoCukp4f_Q@mail.gmail.com> <CAAWbhmjPu2VNS8MhwDp=+hu61EsJ3zf_rTRtyZ8Qw08eAhg_pA@mail.gmail.com> <f98e0b81-96cb-b0d8-c483-e99563cc44b4@amazon.com> <3b678314-054a-6119-b373-4574067f404e@timescale.com> <cc8aaffb-1008-eaf6-090e-2461cbe6e1cf@amazon.com> <Yu4JhEvh1V0sGWXv@paquier.xyz> <af85ae52-de60-6a98-d69e-7d410aee752d@joeconway.com> <Yu9slCBp0WWD4Qx1@paquier.xyz> <d25a412e-9686-d37f-3bd1-63b821f67a51@amazon.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox