Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hGD07-0003qd-6r for pgsql-committers@arkaria.postgresql.org; Tue, 16 Apr 2019 01:35:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hGD04-0007Iz-QE for pgsql-committers@arkaria.postgresql.org; Tue, 16 Apr 2019 01:35:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hGD04-0007Is-GJ for pgsql-committers@lists.postgresql.org; Tue, 16 Apr 2019 01:35:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hGCzy-0005q9-1e for pgsql-committers@lists.postgresql.org; Tue, 16 Apr 2019 01:35:03 +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 x3G1YtJM030006; Mon, 15 Apr 2019 21:34:55 -0400 From: Tom Lane To: Noah Misch cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Consistently test for in-use shared memory. In-reply-to: <20190416011830.GB3296237@rfd.leadboat.com> References: <26478.1555373328@sss.pgh.pa.us> <20190416005019.GA3296237@rfd.leadboat.com> <28362.1555375956@sss.pgh.pa.us> <28797.1555376505@sss.pgh.pa.us> <20190416011830.GB3296237@rfd.leadboat.com> Comments: In-reply-to Noah Misch message dated "Mon, 15 Apr 2019 18:18:30 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30004.1555378495.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 15 Apr 2019 21:34:55 -0400 Message-ID: <30005.1555378495@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Noah Misch writes: > No. We expect never to run one; it was there for the unexpected case of > "postgres --single" startup succeeding. I pushed a change to close the = stdin > of "postgres --single" instead of writing to it. Ah, good, that's safer than what I was imagining. > I probably worried that > "postgres --single" would not tolerate that, but it seems to. Sure. EOF-on-stdin is the standard way to end a standalone-backend session. This fix means it'd have zero queries to execute rather than one, but I'd be entirely willing to call it a backend bug if that didn't work. The more important point of course is that we must correctly detect test failure if the backend doesn't complain. But since the test explicitly looks for a particular error message text, that seems fine. regards, tom lane