diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2015-05-13 09:44:43 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2015-05-13 10:06:47 +0300 |
commit | f6c4a8690c9374be828c7fca4c2b6199f39b27fa (patch) | |
tree | 03405cf9f77f6b9a65751c8468427aa67fde93d1 /src/backend/utils/adt/tsquery_cleanup.c | |
parent | dd75518d523a1e3650b5d5ad20c755a000425739 (diff) |
Fix RBM_ZERO_AND_LOCK mode to not acquire lock on local buffers.
Commit 81c45081 introduced a new RBM_ZERO_AND_LOCK mode to ReadBuffer, which
takes a lock on the buffer before zeroing it. However, you cannot take a
lock on a local buffer, and you got a segfault instead. The version of that
patch committed to master included a check for !isLocalBuf, and therefore
didn't crash, but oddly I missed that in the back-patched versions. This
patch adds that check to the back-branches too.
RBM_ZERO_AND_LOCK mode is only used during WAL replay, and in hash indexes.
WAL replay only deals with shared buffers, so the only way to trigger the
bug is with a temporary hash index.
Reported by Artem Ignatyev, analysis by Tom Lane.
Diffstat (limited to 'src/backend/utils/adt/tsquery_cleanup.c')
0 files changed, 0 insertions, 0 deletions