bufmgr: Add some more error checking [infrastructure] around pinning

This adds a few more assertions against a buffer being local in places we
don't expect, and extracts the check for a buffer being pinned exactly once
from LockBufferForCleanup() into its own function. Later commits will use this
function.

Reviewed-by: Heikki Linnakangas <[email protected]>
Reviewed-by: Melanie Plageman <[email protected]>
Discussion: http://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/819b69a81d307e2ad8e9752cf062ebb57813960d

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 44 +++++++++++++++++++++++++++----------
src/include/storage/bufmgr.h        |  1 +
2 files changed, 33 insertions(+), 12 deletions(-)

Reply via email to