Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> How about having it sleep for a short while, then try again?
I could get behind that, but I don't think the delay should be more than
100ms or so. It's important for the postmaster to acquire the lock (or
not) pretty quickly, or pg_ctl is going to get confused. If we keep it
short, we can also dispense with the log spam you were suggesting.
(Actually, I wonder if this type of scenario isn't going to confuse
pg_ctl already --- it might think the lockfile belongs to the postmaster
*it* started, not some pre-existing one. Does that matter?)
regards, tom lane