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

Andy Fan <zhihuifan1213@163.com>

From: Andy Fan <zhihuifan1213@163.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Jacob Champion <jchampion@timescale.com>, "Drouvot, Bertrand" <bdrouvot@amazon.com>, Joe Conway <mail@joeconway.com>, Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, "sfrost@snowman.net" <sfrost@snowman.net>, "rjuju123@gmail.com" <rjuju123@gmail.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, "andres@anarazel.de" <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org
Date: 2024-02-15T08:53:30Z
Lists: pgsql-hackers

Attachments

Hi,

Michael Paquier <michael@paquier.xyz> writes:

> [[PGP Signed Part:Undecided]]
> On Tue, Aug 23, 2022 at 10:04:30AM -0700, Jacob Champion wrote:
>
> My main worry here is EXEC_BACKEND, where we would just use our own
> implementation of fork(), and it is a bad idea at the end to leave
> that untouched while we could have code paths that attempt to access
> it.  At the end, I have moved the initialization at the same place as
> where we set MyProcPort for a backend in BackendInitialize(), mainly
> as a matter of consistency because ClientConnectionInfo is aimed at
> being a subset of that.  And applied.

I found a compiler complaint of this patch. The attached fix that.

-- 
Best Regards
Andy Fan

Commits

  1. Remove initialization of MyClientConnectionInfo at backend startup

  2. Allow parallel workers to retrieve some data from Port