Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g4otw-0005Ha-Fw for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Sep 2018 15:05:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g4otu-0006lV-LT for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Sep 2018 15:05:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g4otu-0006kf-3M for pgsql-hackers@lists.postgresql.org; Tue, 25 Sep 2018 15:05:22 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g4otr-0004Y6-86 for pgsql-hackers@lists.postgresql.org; Tue, 25 Sep 2018 15:05:20 +0000 Received: by mail-pf1-x442.google.com with SMTP id d4-v6so11452505pfn.0 for ; Tue, 25 Sep 2018 08:05:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TBc3F7l+CAFRn9c9BWu4MkBkNmmLAgMQyFxiBD3kFXQ=; b=DvewB9RJ5HkGMA5cBjyzSe3DhgxF5X27h/gVHjEp2cEaMMrjpem88aKlaX/1ZU7+/M nQn7PspG9SPv2/9e6qzcI+8mLNM7b9XJMgQC1rYXMvpU9w4Bd2Eg69qY5jIxfMwN8xsN xdSuG4s4Qsw6mlqxpugJyDhKSSN8pjneNR2kY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TBc3F7l+CAFRn9c9BWu4MkBkNmmLAgMQyFxiBD3kFXQ=; b=GS/9/gl1DHewJKBFbryLRfuMN3ZBoVccvgLzP4RwTCRuxIoTaiiYtUD1nZx3EvhMhQ cdiaW0y3Aqnv0YgT8SgHhN2m3hYUWYkaYs3wCT1d3GIU4gZKeg44CwRU172/9KZS07i1 GxijUkp6iwB6sk7Od9Y2MApelcSjjujoD5p/lgbHqeEvl/lNch3GppKK46E8akbQHDrP CVu63bD/Q7xnQNQUXiiun0QBZ6iEH9Ll4P08i1TIDyXJIHdfiA56jkFAiE5uOnWzWgv8 an9kEz9I2d+lgGyo+oIC/iB1OelQW5i9e+uByQtq8MyD2u3AORCUqv3O4D4J0LMXHzTO ERHA== X-Gm-Message-State: ABuFfoij1jH09d93ZfLbSxMvmym5CyrUGzSXfdO4zDanomjBLToHhdUC 6m55o7ya/RI0cQe5nc1XVS+M6A== X-Google-Smtp-Source: ACcGV62MOtXkx8n1G9mvgrDu668N5xNkQx6upkC+RQZi+/sgS54m4y90QtP0AX1m2DFhgbPGLmNbng== X-Received: by 2002:a65:5347:: with SMTP id w7-v6mr1524357pgr.17.1537887916639; Tue, 25 Sep 2018 08:05:16 -0700 (PDT) Received: from rfd.leadboat.com (c-73-158-248-138.hsd1.ca.comcast.net. [73.158.248.138]) by smtp.gmail.com with ESMTPSA id y136-v6sm4653560pfg.162.2018.09.25.08.05.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Sep 2018 08:05:14 -0700 (PDT) Date: Tue, 25 Sep 2018 08:05:12 -0700 From: Noah Misch To: Tom Lane Cc: Heath Lord , Andres Freund , Thomas Munro , Stephen Frost , PostgreSQL Hackers Subject: Re: "could not reattach to shared memory" on buildfarm member dory Message-ID: <20180925150512.GA3990982@rfd.leadboat.com> References: <20180423231855.GK27724@tamriel.snowman.net> <20180424070646.GA2693533@rfd.leadboat.com> <17897.1525108069@sss.pgh.pa.us> <29823.1525132900@sss.pgh.pa.us> <20180501002419.onmikldoe2ssjauq@alap3.anarazel.de> <18056.1525148010@sss.pgh.pa.us> <22096.1525188710@sss.pgh.pa.us> <20180819020007.GD3795674@rfd.leadboat.com> <14554.1537811585@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14554.1537811585@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Sep 24, 2018 at 01:53:05PM -0400, Tom Lane wrote: > Noah Misch writes: > > In this proof of concept, the > > postmaster does not close its copy of a backend socket until the backend > > exits. > > That seems unworkable because it would interfere with detection of client > connection drops. But since you say this is just a POC, maybe you > intended to fix that? It'd probably be all right for the postmaster to > hold onto the socket until the new backend reports successful attach, > using the same signaling mechanism you had in mind for the other way. It wasn't relevant to the concept being proven, so I suspended decisions in that area. Arranging for socket closure is a simple matter of programming. > Overall, I agree that neither of these approaches are exactly attractive. > We're paying a heck of a lot of performance or complexity to solve a > problem that shouldn't even be there, and that we don't understand well. > In particular, the theory that some privileged code is injecting a thread > into every new process doesn't square with my results at > https://www.postgresql.org/message-id/15345.1525145612%40sss.pgh.pa.us > > I think our best course of action at this point is to do nothing until > we have a clearer understanding of what's actually happening on dory. > Perhaps such understanding will yield an idea for a less painful fix. I see.