Re: pgsql: Consistently test for in-use shared memory. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Consistently test for in-use shared memory.
Date
Msg-id 30005.1555378495@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Consistently test for in-use shared memory.  (Noah Misch <noah@leadboat.com>)
List pgsql-committers
Noah Misch <noah@leadboat.com> 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



pgsql-committers by date:

Previous
From: Noah Misch
Date:
Subject: Re: pgsql: Consistently test for in-use shared memory.
Next
From: Michael Paquier
Date:
Subject: pgsql: Remove duplicate assignment when initializing logical decoderco