agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Test stabilization for online checksums
Date: Mon, 06 Apr 2026 00:05:31 +0000
Message-ID: <E1w9XT8-0039Ze-19@gemulon.postgresql.org> (raw)

Test stabilization for online checksums

Postcommit review and buildfarm/CI failures revealed a few issues in
the test code which this commit attempts to resolve.  These failures
are verified using synthetic means.

  * Wait for launcher exit in enable/disable checksum tests

    When enabling or disabling data checksums in a test with waiting
    for an end state (on or off), the test typically want to perform
    more test against the cluster immediately. Make sure to wait for
    the launcher to exit in these cases before returning in order to
    know it can immediately be acted on.  This is a more generic way
    of implementating 0036232ba8f.

  * Refactor injection point tests to use the injection_points test
    extension. Two injection points added for online checksums were
    better expressed using the injection_points extension with the
    test code embedded in datachecksum_state.c.

  * Make tests less timing dependent and allow transitions to "on"
    and not just "inprogress-on" in case a test manages to finish
    before it's checked for state.

  * When waiting on a blocking background psql keeping a temporary
    table open, the test first closed the background session abd
    then the server.  This could cause data checksums to manage to
    get enabled in the brief window between dropping the temporary
    table and closing the server.  Fix by closing the server first
    before the background session.

  * Remove a few superfluous duplicate checks and general cleanup
    of comments as well as making LSN logging consistent.

These issues were reported by Andres as well as spotted in the
buildfarm and on CI.

Author: Daniel Gustafsson <daniel@yesql.se>
Reported-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/92F25C14-801E-4198-994D-D83E31FEB0D8@yesql.se

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/07009121c235dc1b9338b57b6a85006a5e3b0bd8

Modified Files
--------------
src/backend/postmaster/datachecksum_state.c        | 26 ++++++-
src/test/modules/test_checksums/t/001_basic.pl     |  6 +-
.../test_checksums/t/003_standby_restarts.pl       | 14 ++--
src/test/modules/test_checksums/t/004_offline.pl   |  8 ++-
src/test/modules/test_checksums/t/005_injection.pl | 12 +++-
.../modules/test_checksums/t/006_pgbench_single.pl | 16 ++++-
.../test_checksums/t/007_pgbench_standby.pl        | 19 ++++--
src/test/modules/test_checksums/t/008_pitr.pl      |  8 +--
.../test_checksums/t/DataChecksums/Utils.pm        | 24 ++++++-
.../modules/test_checksums/test_checksums--1.0.sql |  8 ---
src/test/modules/test_checksums/test_checksums.c   | 79 ----------------------
11 files changed, 101 insertions(+), 119 deletions(-)



Message-ID: <E1w9XT8-0039Ze-19@gemulon.postgresql.org>
Permalink:  ../E1w9XT8-0039Ze-19@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w9XT8-0039Ze-19@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: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Test stabilization for online checksums
  In-Reply-To: <E1w9XT8-0039Ze-19@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox