"Tom Lane" <tgl@sss.pgh.pa.us> writes:
> Gregory Stark <stark@enterprisedb.com> writes:
>> Is it possible for unlocking the semaphore to wake another process other than
>> our own? In which case checking log_lock_waits before signalling the semaphore
>> arguably locks us into having log_lock_waits be PGC_POSTMASTER.
>
> How you figure that?
Well I'm not clear exactly what's going on with the semaphores here. If it's
possible for to be printing the messages only as a result of another backend
unlocking the semaphore then making the PGSemaphoreUnlock conditional on
log_lock_waits means you can't enable log_lock_waits after startup and get
deterministic behaviour because whether you get messages will depend on which
other backend happens to wake you up.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com