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: heapam: Don't mimic MarkBufferDirtyHint() in inplace updates
Date: Tue, 10 Mar 2026 16:01:32 +0000
Message-ID: <E1vzzWW-003Kay-26@gemulon.postgresql.org> (raw)

heapam: Don't mimic MarkBufferDirtyHint() in inplace updates

Previously heap_inplace_update_and_unlock() used an operation order similar to
MarkBufferDirty(), to reduce the number of different approaches used for
updating buffers.  However, in an upcoming patch, MarkBufferDirtyHint() will
switch to using the update protocol used by most other places (enabled by hint
bits only being set while holding a share-exclusive lock).

Luckily it's pretty easy to adjust heap_inplace_update_and_unlock(). As a
comment already foresaw, we can use the normal order, with the slight change
of updating the buffer contents after WAL logging.

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/5ubipyssiju5twkb7zgqwdr7q2vhpkpmuelxfpanetlk6ofnop@hvxb4g2amb2d

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f4a4ce52c0d1565c13c436ea17960d22787ea752

Modified Files
--------------
src/backend/access/heap/heapam.c | 35 +++++++++++++----------------------
1 file changed, 13 insertions(+), 22 deletions(-)



Message-ID: <E1vzzWW-003Kay-26@gemulon.postgresql.org>
Permalink:  ../E1vzzWW-003Kay-26@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vzzWW-003Kay-26@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: heapam: Don't mimic MarkBufferDirtyHint() in inplace updates
  In-Reply-To: <E1vzzWW-003Kay-26@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