From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: PostmasterContext survives into parallel workers!?
Date: Tue, 02 Aug 2016 10:57:14 -0400
Message-ID: <26510.1470149834@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoY1zUBri87PXsJdOFiGW0prHeM4o1Q=p=dd-c+7G8-SHg@mail.gmail.com>
References: <14111.1470082717@sss.pgh.pa.us>
<CA+TgmoYZ7LB5erAQ7AbigruWhcHoqxhvfYOF1mVxU-XT7rs+FA@mail.gmail.com>
<20160801221829.kfa7hzqlzt47mwsb@alap3.anarazel.de>
<19232.1470090524@sss.pgh.pa.us>
<CAEepm=0ifsFUerOSzrfGNnq2pxWNrPLsdh=-XG-1cK2tn+sL2A@mail.gmail.com>
<22056.1470094948@sss.pgh.pa.us>
<CA+TgmoY1zUBri87PXsJdOFiGW0prHeM4o1Q=p=dd-c+7G8-SHg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Aug 1, 2016 at 7:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> ... This is what makes me dubious that getting rid
>> of doing work in the postmaster's signal handlers is really going
>> to add any noticeable increment of safety. It might make the
>> code look cleaner, but I'm afraid it's going to be a lot of churn
>> for not much gain.
> It's not just a cosmetic issue.
> See https://www.postgresql.org/message-id/CA+Tgmobr+Q2WgWeasdbDNefVwJkAGALxA=-VtEGNtQgL1V2Ryw@mail.gmail...
> and d0410d66037c2f3f9bee45e0a2db9e47eeba2bb4.
I do not think that patch particularly bears on this question. We have
had logic bugs in the postmaster in the current coding structure, and
we undoubtedly would still have logic bugs in the postmaster if it were
rewritten to avoid using nontrivial signal handlers. They'd just be
in different places.
Also, the message you mention does a fine job of summarizing why getting
out of the signal-handler-based design will be fraught with a bunch of
new portability hazards.
But what I was responding to here is the claim that we have portability
hazards built into the current code as a consequence of doing work in the
signal handlers. AFAICT, that's just FUD, and is sufficiently disproven
by the many years of reliable service we've gotten out of the current
design.
Anyway, if someone is really motivated to rewrite the postmaster, I
won't stand in the way. I'm just opining that that it will be a lot
of work that would be better expended elsewhere.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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, robertmhaas@gmail.com, thomas.munro@enterprisedb.com, andres@anarazel.de
Subject: Re: PostmasterContext survives into parallel workers!?
In-Reply-To: <26510.1470149834@sss.pgh.pa.us>
References: <14111.1470082717@sss.pgh.pa.us> <CA+TgmoYZ7LB5erAQ7AbigruWhcHoqxhvfYOF1mVxU-XT7rs+FA@mail.gmail.com> <20160801221829.kfa7hzqlzt47mwsb@alap3.anarazel.de> <19232.1470090524@sss.pgh.pa.us> <CAEepm=0ifsFUerOSzrfGNnq2pxWNrPLsdh=-XG-1cK2tn+sL2A@mail.gmail.com> <22056.1470094948@sss.pgh.pa.us> <CA+TgmoY1zUBri87PXsJdOFiGW0prHeM4o1Q=p=dd-c+7G8-SHg@mail.gmail.com> <26510.1470149834@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