Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUb8F-0004c1-8h for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Aug 2016 14:57:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bUb8E-0007MF-Rl for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Aug 2016 14:57:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bUb8E-0007Ly-B7 for pgsql-hackers@postgresql.org; Tue, 02 Aug 2016 14:57:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bUb8A-0004OE-J9 for pgsql-hackers@postgresql.org; Tue, 02 Aug 2016 14:57:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u72EvEIC026511; Tue, 2 Aug 2016 10:57:14 -0400 From: Tom Lane To: Robert Haas cc: Thomas Munro , Andres Freund , "pgsql-hackers@postgresql.org" Subject: Re: PostmasterContext survives into parallel workers!? In-reply-to: References: <14111.1470082717@sss.pgh.pa.us> <20160801221829.kfa7hzqlzt47mwsb@alap3.anarazel.de> <19232.1470090524@sss.pgh.pa.us> <22056.1470094948@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Mon, 01 Aug 2016 23:32:59 -0400" Date: Tue, 02 Aug 2016 10:57:14 -0400 Message-ID: <26510.1470149834@sss.pgh.pa.us> X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas writes: > On Mon, Aug 1, 2016 at 7:42 PM, Tom Lane 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.com > 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