• Kevin Grittner's avatar
    Fix calculation of PREDICATELOCK_MANAGER_LWLOCK_OFFSET. · bfaa8c66
    Kevin Grittner authored
    Commit ea9df812 failed to include
    NUM_BUFFER_PARTITIONS in this offset, resulting in a bad offset.
    Ultimately this threw off NUM_FIXED_LWLOCKS which is based on
    earlier offsets, leading to memory allocation problems.  It seems
    likely to have also caused increased LWLOCK contention when
    serializable transactions were used, because lightweight locks used
    for that overlapped others.
    
    Reported by Amit Kapila with analysis and fix.
    Backpatch to 9.4, where the bug was introduced.
    bfaa8c66
lwlock.h 9.19 KB