pgsql: Assert that buffer is pinned in LockBuffer(). - Mailing list pgsql-committers

From Peter Geoghegan
Subject pgsql: Assert that buffer is pinned in LockBuffer().
Date
Msg-id E1jxerQ-0004Kf-7t@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Assert that buffer is pinned in LockBuffer().

Strengthen the LockBuffer() assertion that verifies BufferIsValid() by
making it verify BufferIsPinned() instead.  Do the same in nearby
related functions.

There is probably not much chance that anybody will try to lock a buffer
that is not already pinned, but we might as well make sure of that.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6ca7cd89a2d1998b16e8168dda62d43a9e0fdaff

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Kluge slot_compile_deform() to ignore incorrect attnotnull marki
Next
From: Tom Lane
Date:
Subject: pgsql: Make floating-point "NaN / 0" return NaN instead of raising an e