agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Melanie Plageman <melanieplageman@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make on-access pruning pin visibility map before locking heap pa
Date: Sat, 12 Sep 2026 00:39:56 +0000
Message-ID: <E1x5Bmd-00000004VRD-1Adc@gemulon.postgresql.org> (raw)

Make on-access pruning pin visibility map before locking heap page

b46e1e54d078 pinned the VM after acquiring a cleanup lock on the heap
page when on-access pruning. This was not correct, as pinning the VM may
require I/O. Pin the VM before acquiring the lock. This could mean
occasional unneeded pinning when the buffer is under contention, but
that should be rare.

Reported-by: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CAAKRu_aR6e2mNVo-DNHDUfBE5i0cbE4%3Du%3D_Qi9%2Bv573qiGtBig%40mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/512d3e8919b649d36a6f246c657c8b8df7536e8a

Modified Files
--------------
src/backend/access/heap/pruneheap.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1x5Bmd-00000004VRD-1Adc@gemulon.postgresql.org>
Permalink:  ../E1x5Bmd-00000004VRD-1Adc@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1x5Bmd-00000004VRD-1Adc@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: melanieplageman@gmail.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Make on-access pruning pin visibility map before locking heap pa
  In-Reply-To: <E1x5Bmd-00000004VRD-1Adc@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox