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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Consistently test for in-use shared memory.
Date: 2019-04-16 01:34:55
Message-ID: 30005.1555378495@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Noah Misch <noah(at)leadboat(dot)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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-04-16 06:12:44 pgsql: Remove duplicate assignment when initializing logical decoder co
Previous Message Noah Misch 2019-04-16 01:18:30 Re: pgsql: Consistently test for in-use shared memory.