pgsql: Assert that buffer is pinned in LockBuffer().

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Assert that buffer is pinned in LockBuffer().
Date: 2020-07-20 23:06:16
Message-ID: E1jxerQ-0004Kf-7t@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-07-20 23:44:54 pgsql: Make floating-point "NaN / 0" return NaN instead of raising an e
Previous Message Tom Lane 2020-07-20 19:54:38 pgsql: Kluge slot_compile_deform() to ignore incorrect attnotnull marki