pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_stash_advice: Fix race conditions in 001_persist.pl
Date: Fri, 30 Oct 2026 16:45:31 +0000
Message-ID: <E1xMpjP-00000001QaS-2TWw@gemulon.postgresql.org> (raw)

pg_stash_advice: Fix race conditions in 001_persist.pl

Each time we start the server, there's a brief lockout while the
persistence worker reloads stashes from disk. Until that's complete,
no stashes will be visible and no stash modifications can be made.
This test case failed to take that into account, and could therefore
fail spuriously.

Reported-by: Alexander Lakhin <exclusion@gmail.com>
Reported-by: Nik Samokhvalov <nik@postgres.ai>
Author: Nik Samokhvalov <nik@postgres.ai>
Co-authored-by: Robert Haas <rhaas@postgresql.org> (whitespace changes)
Backpatch-through: 19
Discussion: http://postgr.es/m/CAM527d8PqdbDy=PuTLYBJM8-FvvFDr2BLcyFyZhw6Oi9rXb14g@mail.gmail.com

Branch
------
REL_19_STABLE

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

Modified Files
--------------
contrib/pg_stash_advice/t/001_persist.pl | 28 ++++++++++++++++++++++------
1 file changed, 22 insertions(+), 6 deletions(-)



view thread (2+ messages)

Message-ID: <E1xMpjP-00000001QaS-2TWw@gemulon.postgresql.org>
Permalink:  ../E1xMpjP-00000001QaS-2TWw@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xMpjP-00000001QaS-2TWw@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: rhaas@postgresql.org
  Subject: Re: pgsql: pg_stash_advice: Fix race conditions in 001_persist.pl
  In-Reply-To: <E1xMpjP-00000001QaS-2TWw@gemulon.postgresql.org>
  References: <E1xMpjP-00000001QaS-2TWw@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