• T
    Repair a low-probability race condition identified by Qingqing Zhou. · 0fcc3c2f
    Tom Lane 提交于
    If a process abandons a wait in LockBufferForCleanup (in practice,
    only happens if someone cancels a VACUUM) just before someone else
    sends it a signal indicating the buffer is available, it was possible
    for the wakeup to remain in the process' semaphore, causing misbehavior
    next time the process waited for an lmgr lock.  Rather than try to
    prevent the race condition directly, it seems best to make the lock
    manager robust against leftover wakeups, by having it repeat waiting
    on the semaphore if the lock has not actually been granted or denied
    yet.
    0fcc3c2f
lock.c 66.2 KB