pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Do CHECK_FOR_INTERRUPTS inside, not before, scanGetItem.
Date: Tue, 26 Aug 2025 16:09:12 +0000
Message-ID: <E1uqwER-001mP3-2X@gemulon.postgresql.org> (raw)

Do CHECK_FOR_INTERRUPTS inside, not before, scanGetItem.

The CHECK_FOR_INTERRUPTS call in gingetbitmap turns out to be
inadequate to prevent a long uninterruptible loop, because
we now know a case where looping occurs within scanGetItem.
While the next patch will fix the bug that caused that, it
seems foolish to assume that no similar patterns are possible.
Let's do the CFI within scanGetItem's retry loop, instead.
This demonstrably allows canceling out of the loop exhibited
in bug #19031.

Bug: #19031
Reported-by: Tim Wood <washwithcare@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/19031-0638148643d25548@postgresql.org
Backpatch-through: 13

Branch
------
master

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

Modified Files
--------------
src/backend/access/gin/ginget.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1uqwER-001mP3-2X@gemulon.postgresql.org>
Permalink:  ../E1uqwER-001mP3-2X@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uqwER-001mP3-2X@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Do CHECK_FOR_INTERRUPTS inside, not before, scanGetItem.
  In-Reply-To: <E1uqwER-001mP3-2X@gemulon.postgresql.org>
  References: <E1uqwER-001mP3-2X@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