pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Jacob Champion <jchampion@timescale.com>
Cc: Drouvot, Bertrand <bdrouvot@amazon.com>
Cc: Joe Conway <mail@joeconway.com>
Cc: Robert Haas <robertmhaas@gmail.com>
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: Wed, 24 Aug 2022 00:40:54 -0400
Message-ID: <903552.1661316054@sss.pgh.pa.us> (raw)
In-Reply-To: <YwWjqSPH7WtSrjrF@paquier.xyz>
References: <127bd019-04f0-313c-551c-d949cdc4ad50@amazon.com>
	<YvjHFPs2yEDiMLVU@paquier.xyz>
	<520bd3ce-334b-b9c2-2130-858fb04ce56f@amazon.com>
	<CAAWbhmgJ-5YHyOO4ioa-q1bDRexiwMBFru6jJVmV+ShUx_0yeQ@mail.gmail.com>
	<2541c086-e370-d114-69a7-b48b05b25471@amazon.com>
	<YwNpWPCx63D8R8gG@paquier.xyz>
	<CAAWbhmjmwz+QYVTANpmOayfST4x1ey1ZALpgjNwqTeMeH9Ssew@mail.gmail.com>
	<YwQ6r35/uNC2lm26@paquier.xyz>
	<c4800477-c877-25ab-3ba8-ab53a1510831@amazon.com>
	<bbf2b922-4ff7-5c30-e3ef-2a8bdcdd1116@timescale.com>
	<YwWjqSPH7WtSrjrF@paquier.xyz>

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





view thread (89+ messages)  latest in thread

Message-ID: <903552.1661316054@sss.pgh.pa.us>
Permalink:  ../903552.1661316054@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/903552.1661316054@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, michael@paquier.xyz, jchampion@timescale.com, bdrouvot@amazon.com, mail@joeconway.com, robertmhaas@gmail.com, sfrost@snowman.net, rjuju123@gmail.com, andres@anarazel.de
  Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers
  In-Reply-To: <903552.1661316054@sss.pgh.pa.us>
  References: <127bd019-04f0-313c-551c-d949cdc4ad50@amazon.com> <YvjHFPs2yEDiMLVU@paquier.xyz> <520bd3ce-334b-b9c2-2130-858fb04ce56f@amazon.com> <CAAWbhmgJ-5YHyOO4ioa-q1bDRexiwMBFru6jJVmV+ShUx_0yeQ@mail.gmail.com> <2541c086-e370-d114-69a7-b48b05b25471@amazon.com> <YwNpWPCx63D8R8gG@paquier.xyz> <CAAWbhmjmwz+QYVTANpmOayfST4x1ey1ZALpgjNwqTeMeH9Ssew@mail.gmail.com> <YwQ6r35/uNC2lm26@paquier.xyz> <c4800477-c877-25ab-3ba8-ab53a1510831@amazon.com> <bbf2b922-4ff7-5c30-e3ef-2a8bdcdd1116@timescale.com> <YwWjqSPH7WtSrjrF@paquier.xyz> <903552.1661316054@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