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