| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Add more tests for backend statistics |
| Date: | 2026-11-25 04:31:19 |
| Message-ID: | E1xW4f8-00000000Dfi-31RO@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(dot)pg(at)gmail(dot)com>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Reviewed-by: Michael Paquier <michael(at)paquier(dot)xyz>
Discussion: https://postgr.es/m/anCjoFkGah/uB7lw(at)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(+)
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Tom Lane | 2026-11-25 02:20:15 | pgsql: Avoid null pointer crash after pg_localtime()/pg_gmtime() failur |