Alvaro Herrera <alvherre@commandprompt.com> writes:
> I wonder, if we were to use an LWLock to protect writing to the stderr
> pipe, would it be too contentious?
Sorry, that's a nonstarter.
1. Not all our processes are connected to shared memory. Even the ones
that are don't necessarily have PGPROCs.
2. If somebody crashes while holding the lock, the entire system
including the postmaster soon freezes up.
3. Having the postmaster take LWLocks is verboten anyway, mainly because
of problem #2.
regards, tom lane