Assert that buffer is pinned in LockBuffer().

Peter Geoghegan <pg@bowt.ie>

Commit: 6ca7cd89a2d1998b16e8168dda62d43a9e0fdaff
Author: Peter Geoghegan <pg@bowt.ie>
Date: 2020-07-20T23:03:38Z
Releases: 14.0
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.

Files

PathChange+/−
src/backend/storage/buffer/bufmgr.c modified +3 −3