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: Move SQL tests of pg_stat_io for WAL data to recovery test 029_s
Date: Fri, 07 Feb 2025 00:45:00 +0000
Message-ID: <E1tgCUO-005l62-EY@gemulon.postgresql.org> (raw)

Move SQL tests of pg_stat_io for WAL data to recovery test 029_stats_restart

Three tests in the main regression test suite are proving to not be
portable across multiple runs on a deployed cluster as stats of
pg_stat_io are reset.  Problems happen for tests on:
- Writes of WAL in the init context, when creating a WAL segment.
- Syncs of WAL in the init context, when creating a WAL segment.
- Reads of WAL in the normal context, requiring a WAL record to be read.
For a `make check`, this could rely on the checkpoint record read by the
startup process when starting the cluster, something that is not going
to work for a deployed node.

Two of the three tests are moved to the recovery TAP test
029_stats_restart, where we already check the consistency of stats
data.  The test for syncs is dropped as TAP can run with fsync=off.  The
other two are checked with some data from a freshly-initialized cluster.

Per discussion with Tom Lane, Bertrand Drouvot and Nazir Bilal Yavuz.

Discussion: https://postgr.es/m/915687.1738780322@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/428fadb7e97e3c95180d75dea73de99c491a9f65

Modified Files
--------------
src/test/recovery/t/029_stats_restart.pl | 34 +++++++++++++++++++++++++++++++-
src/test/regress/expected/stats.out      | 27 -------------------------
src/test/regress/sql/stats.sql           | 14 -------------
3 files changed, 33 insertions(+), 42 deletions(-)



Message-ID: <E1tgCUO-005l62-EY@gemulon.postgresql.org>
Permalink:  ../E1tgCUO-005l62-EY@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tgCUO-005l62-EY@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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Move SQL tests of pg_stat_io for WAL data to recovery test 029_s
  In-Reply-To: <E1tgCUO-005l62-EY@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