• Tom Lane's avatar
    Remove ShutdownBufferPoolAccess exit callback, and do the work in · 8a6fab41
    Tom Lane authored
    ProcKill instead, where we still have a PGPROC with which to wait on
    LWLocks.  This fixes 'can't wait without a PROC structure' failures
    occasionally seen during backend shutdown (I'm surprised they weren't
    more frequent, actually).  Add an Assert() to LWLockAcquire to help
    catch any similar mistakes in future.  Fix failure to update MyProcPid
    for standalone backends and pgstat processes.
    8a6fab41
lwlock.c 13.4 KB