Assert that buffer is pinned in LockBuffer().
commit6ca7cd89a2d1998b16e8168dda62d43a9e0fdaff
authorPeter Geoghegan <pg@bowt.ie>
Mon, 20 Jul 2020 23:03:38 +0000 (20 16:03 -0700)
committerPeter Geoghegan <pg@bowt.ie>
Mon, 20 Jul 2020 23:03:38 +0000 (20 16:03 -0700)
tree07c4d5a67fe43446af44061293a865a4770aff07
parent0fa0b487b5d75d2b8576dec86a317212542642b8
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.
src/backend/storage/buffer/bufmgr.c