pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: bufmgr: Add some more error checking [infrastructure] around pin
Date: Wed, 05 Apr 2023 17:45:48 +0000
Message-ID: <E1pk7Cd-001WqB-0p@gemulon.postgresql.org> (raw)

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 <hlinnaka@iki.fi>
Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Discussion: http://postgr.es/m/419312fd-9255-078c-c3e3-f0525f911d7f@iki.fi

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(-)



Message-ID: <E1pk7Cd-001WqB-0p@gemulon.postgresql.org>
Permalink:  ../E1pk7Cd-001WqB-0p@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pk7Cd-001WqB-0p@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: bufmgr: Add some more error checking [infrastructure] around pin
  In-Reply-To: <E1pk7Cd-001WqB-0p@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox