GH <grasshacker(at)over-yonder(dot)net> writes:
> Ah hah, I think I founnd the source of this and the file descriptor
> problem (for those of you who are familiar with it):
This is a known bug in 7.0 psql --- it leaks backend connections when
looping on a Password: prompt. I thought we'd back-patched the fix
into 7.0.3, but a check of the CVS logs shows we didn't :-(.
pg_ctl is being pretty naive here in assuming that a parameterless
psql invocation will be able to connect, but the real misbehavior is
inside psql.
regards, tom lane