pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <jdavis@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Assert that buffers are marked dirty before XLogRegisterBuffer()
Date: Tue, 24 Oct 2023 00:43:03 +0000
Message-ID: <E1qv5Ve-0022lC-Px@gemulon.postgresql.org> (raw)

Assert that buffers are marked dirty before XLogRegisterBuffer().

Enforce the rule from transam/README in XLogRegisterBuffer(), and
update callers to follow the rule.

Hash indexes sometimes register clean pages as a part of the locking
protocol, so provide a REGBUF_NO_CHANGE flag to support that use.

Discussion: https://postgr.es/m/c84114f8-c7f1-5b57-f85a-3adc31e1a904@iki.fi
Reviewed-by: Heikki Linnakangas

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/00d7fb5e2e39198387ae00af8dd18b787b6a4d63

Modified Files
--------------
src/backend/access/gin/ginbtree.c       | 14 ++++----
src/backend/access/gin/gindatapage.c    |  6 ++++
src/backend/access/gin/ginentrypage.c   |  3 ++
src/backend/access/gin/ginfast.c        |  5 +--
src/backend/access/hash/hash.c          | 11 ++++--
src/backend/access/hash/hashovfl.c      | 21 ++++++++----
src/backend/access/transam/xloginsert.c | 16 ++++++++-
src/backend/storage/buffer/bufmgr.c     | 59 +++++++++++++++++++++++++++++++++
src/include/access/xloginsert.h         |  1 +
src/include/storage/bufmgr.h            |  2 ++
10 files changed, 118 insertions(+), 20 deletions(-)



Message-ID: <E1qv5Ve-0022lC-Px@gemulon.postgresql.org>
Permalink:  ../E1qv5Ve-0022lC-Px@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qv5Ve-0022lC-Px@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: jdavis@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Assert that buffers are marked dirty before XLogRegisterBuffer()
  In-Reply-To: <E1qv5Ve-0022lC-Px@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