pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: test_custom_stats: Stabilize test for counters
Date: Sun, 18 Oct 2026 22:09:30 +0000
Message-ID: <E1xIZ4M-00000002AuH-2TvF@gemulon.postgresql.org> (raw)

test_custom_stats: Stabilize test for counters

After 44539786b82, variable-sized stats updates are batched in one
backend.  A later safe_psql() can check the counters before that backend
has finished flushing its pending stats during shutdown, so force a
flush before checking them.

This is only needed before this report check because
test_custom_stats_var_update() uses pgstat_prep_pending_entry(), leaving
counter updates as backend-local pending stats.

Per buildfarm member mamba.  This could be reproduced locally by slowing
down pgstat_shutdown_hook().

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Author: Sami Imseih <samimseih.pg@gmail.com>
Discussion: https://postgr.es/m/193326.1792282194@sss.pgh.pa.us

Branch
------
master

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

Modified Files
--------------
src/test/modules/test_custom_stats/t/001_custom_stats.pl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



Message-ID: <E1xIZ4M-00000002AuH-2TvF@gemulon.postgresql.org>
Permalink:  ../E1xIZ4M-00000002AuH-2TvF@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xIZ4M-00000002AuH-2TvF@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: michael@paquier.xyz
  Subject: Re: pgsql: test_custom_stats: Stabilize test for counters
  In-Reply-To: <E1xIZ4M-00000002AuH-2TvF@gemulon.postgresql.org>
  References: <E1xIZ4M-00000002AuH-2TvF@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