pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Comment on need to MarkBufferDirty() if omitting DELAY_CHKPT_STA
Date: Sun, 20 Apr 2025 19:04:54 +0000
Message-ID: <E1u6ZyI-000zce-0R@gemulon.postgresql.org> (raw)

Comment on need to MarkBufferDirty() if omitting DELAY_CHKPT_START.

Blocking checkpoint phase 2 requires MarkBufferDirty() and
BUFFER_LOCK_EXCLUSIVE; neither suffices by itself.  transam/README documents
this, citing SyncOneBuffer().  Update the DELAY_CHKPT_START documentation to
say this.  Expand the heap_inplace_update_and_unlock() comment that cites
XLogSaveBufferForHint() as precedent, since heap_inplace_update_and_unlock()
could have opted not to use DELAY_CHKPT_START.

Commit 8e7e672cdaa6bfec85d4d5dd9be84159df23bb41 added DELAY_CHKPT_START to
heap_inplace_update_and_unlock().  Since commit
bc6bad88572501aecaa2ac5d4bc900ac0fd457d5 reverted it in non-master branches,
no back-patch.

Discussion: https://postgr.es/m/20250406180054.26.nmisch@google.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/818013665259d4242ba641aad705ebe5a3e2db8e

Modified Files
--------------
src/backend/access/heap/heapam.c | 14 +++++++++++---
src/include/storage/proc.h       |  8 ++++----
2 files changed, 15 insertions(+), 7 deletions(-)



Message-ID: <E1u6ZyI-000zce-0R@gemulon.postgresql.org>
Permalink:  ../E1u6ZyI-000zce-0R@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1u6ZyI-000zce-0R@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: noah@leadboat.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Comment on need to MarkBufferDirty() if omitting DELAY_CHKPT_STA
  In-Reply-To: <E1u6ZyI-000zce-0R@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