pgsql: Allow TAP tests to force checksums off when calling init()

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Allow TAP tests to force checksums off when calling init()
Date: 2024-10-14 09:25:19
Message-ID: E1t0HKJ-000m1D-VX@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow TAP tests to force checksums off when calling init()

TAP tests can write

$node->init(no_data_checksums => 1);

to initialize a cluster explicitly without checksums. Currently, this
is the default, but this change allows running all tests with
checksums enabled, like

PG_TEST_INITDB_EXTRA_OPTS=--data-checksums meson test ...

And this also prepares the tests for when we switch the default to
checksums enabled.

The pg_checksums tests need to disable checksums so it can test its
own functionality of enabling checksums. The amcheck/pg_amcheck tests
need to disable checksums because they manually introduce corruption
that they want to detect, but with checksums enabled, the checksum
verification will fail before they even get to their work.

Author: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Reviewed-by: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Reviewed-by: Peter Eisentraut <peter(at)eisentraut(dot)org>
Discussion: https://www.postgresql.org/message-id/flat/CAKAnmmKwiMHik5AHmBEdf5vqzbOBbcwEPHo4-PioWeAbzwcTOQ(at)mail(dot)gmail(dot)com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e7d0cf42b1acb185edc947a8732843966ea3c160

Modified Files
--------------
contrib/amcheck/t/001_verify_heapam.pl | 2 +-
src/bin/pg_amcheck/t/003_check.pl | 2 +-
src/bin/pg_amcheck/t/004_verify_heapam.pl | 2 +-
src/bin/pg_checksums/t/002_actions.pl | 2 +-
src/test/perl/PostgreSQL/Test/Cluster.pm | 8 ++++++++
5 files changed, 12 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2024-10-14 14:16:37 pgsql: Track scan reversals in MergeJoin
Previous Message Daniel Gustafsson 2024-10-14 08:23:12 pgsql: doc: Add anchors for COPY format descriptions