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

From: Jacob Champion <jchampion(at)timescale(dot)com>
To: "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Joe Conway <mail(at)joeconway(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-23 17:04:30
Message-ID: bbf2b922-4ff7-5c30-e3ef-2a8bdcdd1116@timescale.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/23/22 01:53, Drouvot, Bertrand wrote:
> That sounds all good to me, except a typo for the author in the commit
> message: s/Jocob/Jacob/

Thanks, I missed that on my readthrough! :D

Patch looks good to me, too, with one question:

> @@ -2688,6 +2689,7 @@ InitProcessGlobals(void)
> MyProcPid = getpid();
> MyStartTimestamp = GetCurrentTimestamp();
> MyStartTime = timestamptz_to_time_t(MyStartTimestamp);
> + memset(&MyClientConnectionInfo, 0, sizeof(MyClientConnectionInfo));
>
> /*
> * Set a different global seed in every process. We want something

When can we rely on static initialization, and when can't we? Is there a
concern that the memory could have been polluted from before the
postmaster's fork?

Thanks,
--Jacob

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhihong Yu 2022-08-23 17:10:51 handling multiple matching constraints in DetachPartitionFinalize()
Previous Message Zhihong Yu 2022-08-23 16:57:35 Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition)