Re: [PATCH] Expose port->authn_id to extensions and triggers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Expose port->authn_id to extensions and triggers
Date
Msg-id 903552.1661316054@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Expose port->authn_id to extensions and triggers  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Tue, Aug 23, 2022 at 10:04:30AM -0700, Jacob Champion wrote:
>> 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?

> 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.

Uh ... what?  EXEC_BACKEND is even more certain to correctly initialize
static/global variables in a child process.  I agree with Jacob that
this memset is probably useless, and therefore confusing.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: ICU for global collation
Next
From: John Naylor
Date:
Subject: Re: [PATCH] Optimize json_lex_string by batching character copying