pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Assert that buffer is pinned in LockBuffer().
Date: Mon, 20 Jul 2020 23:06:16 +0000
Message-ID: <E1jxerQ-0004Kf-7t@gemulon.postgresql.org> (raw)

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



Message-ID: <E1jxerQ-0004Kf-7t@gemulon.postgresql.org>
Permalink:  ../E1jxerQ-0004Kf-7t@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jxerQ-0004Kf-7t@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: pg@bowt.ie
  Subject: Re: pgsql: Assert that buffer is pinned in LockBuffer().
  In-Reply-To: <E1jxerQ-0004Kf-7t@gemulon.postgresql.org>
  References: <E1jxerQ-0004Kf-7t@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