pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jacob Champion <pchampion@vmware.com>
Cc: michael@paquier.xyz <michael@paquier.xyz>
Cc: rjuju123@gmail.com <rjuju123@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: andres@anarazel.de <andres@anarazel.de>
Cc: sfrost@snowman.net <sfrost@snowman.net>
Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers
Date: Thu, 17 Mar 2022 18:33:38 -0400
Message-ID: <973625.1647556418@sss.pgh.pa.us> (raw)
In-Reply-To: <c6ffdec0f5da8e149237509fc64e1c41fc8da668.camel@vmware.com>
References: <cdbcf8653e56340f73438e647ea5a26f021627ed.camel@vmware.com>
	<20220225212349.gf76klktl4dmm5ah@alap3.anarazel.de>
	<Yhm9BUjrCItExUJu@paquier.xyz>
	<0cead4e58257beebb96f162507151271ff2f7b54.camel@vmware.com>
	<20220228210036.GN10577@tamriel.snowman.net>
	<Yh3Czv8xFdUzFFfZ@paquier.xyz>
	<20220301133527.GS10577@tamriel.snowman.net>
	<20220302212740.krbycl3nzvp5y2k5@alap3.anarazel.de>
	<YiByHbZslaZXkcqY@paquier.xyz>
	<a521eb40f5068d902c821368f2be0c474a3c2aa6.camel@vmware.com>
	<YiFvNIm4mvvqDo54@paquier.xyz>
	<c6ffdec0f5da8e149237509fc64e1c41fc8da668.camel@vmware.com>

Jacob Champion <pchampion@vmware.com> writes:
> On Fri, 2022-03-04 at 10:45 +0900, Michael Paquier wrote:
>> At the end of the day, Port is an interface used for the communication
>> between the postmaster with the frontends, so I'd like to say that it
>> is correct to not apply this concept to parallel workers because they
>> are not designed to contact any frontend-side things.

> Coming back to this late, sorry. I'm not quite sure where to move with
> this. I'm considering copying pieces of Port over just so we can see
> what it looks like in practice?

> Personally I think it makes sense for the parallel workers to have the
> authn information for the client -- in fact there's a lot of
> information that it seems shouldn't be hidden from them -- but there
> are other pieces, like the socket handle, that are clearly not useful.

Yeah.  It seems to me that putting the auth info into struct Port was
a fairly random thing to do in the first place, and we are now dealing
with the fallout of that.

I think what we ought to do here is separate out the data that we think
parallel workers need access to.  It does not seem wise to say "workers
can access fields A,B,C of MyPort but not fields X,Y,Z".  I do not have
a concrete proposal for fixing it though.

			regards, tom lane





view thread (89+ messages)  latest in thread

Message-ID: <973625.1647556418@sss.pgh.pa.us>
Permalink:  ../973625.1647556418@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/973625.1647556418@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, pchampion@vmware.com, michael@paquier.xyz, rjuju123@gmail.com, andres@anarazel.de, sfrost@snowman.net
  Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers
  In-Reply-To: <973625.1647556418@sss.pgh.pa.us>
  References: <cdbcf8653e56340f73438e647ea5a26f021627ed.camel@vmware.com> <20220225212349.gf76klktl4dmm5ah@alap3.anarazel.de> <Yhm9BUjrCItExUJu@paquier.xyz> <0cead4e58257beebb96f162507151271ff2f7b54.camel@vmware.com> <20220228210036.GN10577@tamriel.snowman.net> <Yh3Czv8xFdUzFFfZ@paquier.xyz> <20220301133527.GS10577@tamriel.snowman.net> <20220302212740.krbycl3nzvp5y2k5@alap3.anarazel.de> <YiByHbZslaZXkcqY@paquier.xyz> <a521eb40f5068d902c821368f2be0c474a3c2aa6.camel@vmware.com> <YiFvNIm4mvvqDo54@paquier.xyz> <c6ffdec0f5da8e149237509fc64e1c41fc8da668.camel@vmware.com> <973625.1647556418@sss.pgh.pa.us>

* 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