From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add more tests for backend statistics
Date: Wed, 25 Nov 2026 04:31:19 +0000
Message-ID: <E1xW4f8-00000000Dfi-31RO@gemulon.postgresql.org> (raw)
Add more tests for backend statistics
This commit adds two sets of tests, providing more coverage for backend
statistics:
- Isolation tests, to provide checks for stats_fetch_consistency across
multiple sessions, coupled with some transactions and/or mixed values of
the GUC.
- SQL tests for backend statistics with WAL data across resets, checking
that backend stats resets do not impact the global stats counters.
These holes in the test coverage have been found by the author, while
working on a different patch set that touches backend statistics.
Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/anCjoFkGah/uB7lw@bdtpg
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c7f5cf46c9e78819e51d419de48e9a37d3c4ee05
Modified Files
--------------
src/test/isolation/expected/stats-backend.out | 225 ++++++++++++++++++++++++++
src/test/isolation/isolation_schedule | 1 +
src/test/isolation/specs/stats-backend.spec | 120 ++++++++++++++
src/test/regress/expected/stats.out | 29 ++++
src/test/regress/sql/stats.sql | 10 ++
5 files changed, 385 insertions(+)
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: Add more tests for backend statistics
In-Reply-To: <E1xW4f8-00000000Dfi-31RO@gemulon.postgresql.org>
References: <E1xW4f8-00000000Dfi-31RO@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