pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@kurilemu.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid use of NOTICE to wait for snapshot invalidation
Date: Tue, 02 Dec 2025 15:44:52 +0000
Message-ID: <E1vQSYe-002SAB-0C@gemulon.postgresql.org> (raw)

Avoid use of NOTICE to wait for snapshot invalidation

This idea (implemented in commits and bc32a12e0db2 and 9e8fa05d3412) of
using notices to detect that a session is sleeping was unreliable, so
simplify the concurrency controller session to just look at
pg_stat_activity for a process sleeping on the injection point we want
it to hit.  This change allows us to remove a secondary injection point
and the alternative expected output files.

Reproduced by Alexander Lakhin following a report in buildfarm member
skink (which runs the server under valgrind).

Author: Mihail Nikalayeu <mihailnikalayeu@gmail.com>
Reported-by: Alexander Lakhin <exclusion@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/3e302c96-cdd2-45ec-af84-03dbcdccde4a@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5dee7a603f664115f8fe9819b0c19abd8209cd02

Modified Files
--------------
src/backend/utils/time/snapmgr.c                   |   1 -
.../index-concurrently-upsert-predicate.out        |  23 ++--
.../index-concurrently-upsert-predicate_1.out      | 116 ---------------------
.../expected/index-concurrently-upsert.out         |  29 ++++--
.../expected/index-concurrently-upsert_1.out       | 116 ---------------------
.../specs/index-concurrently-upsert-predicate.spec |  21 +++-
.../specs/index-concurrently-upsert.spec           |  27 +++--
7 files changed, 72 insertions(+), 261 deletions(-)



Message-ID: <E1vQSYe-002SAB-0C@gemulon.postgresql.org>
Permalink:  ../E1vQSYe-002SAB-0C@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vQSYe-002SAB-0C@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: alvherre@kurilemu.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Avoid use of NOTICE to wait for snapshot invalidation
  In-Reply-To: <E1vQSYe-002SAB-0C@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