pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add CHECK_FOR_INTERRUPTS in Evict{Rel,All}UnpinnedBuffers.
Date: Tue, 04 Nov 2025 23:48:51 +0000
Message-ID: <E1vGQlf-0054Ba-2F@gemulon.postgresql.org> (raw)

Add CHECK_FOR_INTERRUPTS in Evict{Rel,All}UnpinnedBuffers.

This commit adds CHECK_FOR_INTERRUPTS to the shared buffer iteration
loops in EvictRelUnpinnedBuffers and EvictAllUnpinnedBuffers. These
functions, used by pg_buffercache's pg_buffercache_evict_relation and
pg_buffercache_evict_all, can now be interrupted during long-running
operations.

Backpatch to version 18, where these functions and their corresponding
pg_buffercache functions were introduced.

Author: Yuhang Qiu <iamqyh@gmail.com>
Discussion: https://postgr.es/m/8DC280D4-94A2-4E7B-BAB9-C345891D0B78%40gmail.com
Backpatch-through: 18

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8ae0f6a0c3da4b1568b753906eb8ea34d41da251

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 4 ++++
1 file changed, 4 insertions(+)



view thread (2+ messages)

Message-ID: <E1vGQlf-0054Ba-2F@gemulon.postgresql.org>
Permalink:  ../E1vGQlf-0054Ba-2F@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vGQlf-0054Ba-2F@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: msawada@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add CHECK_FOR_INTERRUPTS in Evict{Rel,All}UnpinnedBuffers.
  In-Reply-To: <E1vGQlf-0054Ba-2F@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