]> granicus.if.org Git - postgresql/commit
Fix calculation of PREDICATELOCK_MANAGER_LWLOCK_OFFSET.
authorKevin Grittner <kgrittn@postgresql.org>
Thu, 19 Jun 2014 13:51:54 +0000 (08:51 -0500)
committerKevin Grittner <kgrittn@postgresql.org>
Thu, 19 Jun 2014 13:52:16 +0000 (08:52 -0500)
commit909cab83058b12cabec6fb10c945f67ef09de5ec
tree1c5a63abc9d5cdfd1f675a714b3aa92b8b3f8cd2
parentfc5cf383d9ae894e3c9e94701ce5dc468d334433
Fix calculation of PREDICATELOCK_MANAGER_LWLOCK_OFFSET.

Commit ea9df812d8502fff74e7bc37d61bdc7d66d77a7f 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.
src/include/storage/lwlock.h