]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Test improvements for online checksums
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Thu, 30 Apr 2026 11:41:43 +0000 (13:41 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Thu, 30 Apr 2026 11:41:43 +0000 (13:41 +0200)
commita0d8f4c1ae16ca2c12e208c660f97666be809700
treebf36e25c207b5b6a409ae5e0a340a3085b0f14f7
parentb120358c612dce62b493da7682b4df90a10783c9
Test improvements for online checksums

This includes a number of smaller fixups to the online checksums test
module which were found during postcommit review and stabilization
work.

 * Fix scope increase for PG_TEST_EXTRA: The online checksums tests
   have two levels of PG_TEST_EXTRA, checksum and checksums_extended
   for extra test runs and test runs with increased randomization.
   The logic for increasing the number of test iterations was however
   backwards.
 * Change stopmode for PITR test: The pitr suite used immediate stop
   mode which caused problems on slower machines where the sigquit
   would interrupt archive commands leaving partial WAL files behind.
   This would then prevent restart.  Fix by using fast mode which is
   the appropriate mode for the test at hand.  Also increase timeouts
   to help slower test systems since an expired timeout will incur
   the same effect as an immediate standby with a partial WAL left
   behind.  This issue was observed when running the test suites on
   a Raspberry Pi 4 machine.
 * Improve logging: The test suite for data checksums use a set of
   helper functions in a Perl module to avoid repeating code, this
   makes sure that the helper functions do a better job of logging
   their test output to make debug easier.
 * Remove unused code: wait_for_cluster_crash was used during the
   development of online checksums but was never used in any test
   which shipped, so remove the function.
 * Standby fixes: Ensure no vacuum on pgbench init on standby with
   -n to avoid bogus error message in the log, and enable
   hot_standby_feedback to prevent queries from getting cancelled
   due to recovery on slower systems.

Author: Daniel Gustafsson <daniel@yesql.se>
Author: Tomas Vondra <tomas@vondra.me>
Reviewed-by: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Reviewed-by: SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
Discussion: https://postgr.es/m/9197F930-DDEB-4CAC-82A2-16FEC715CCE8@yesql.se
src/test/modules/test_checksums/t/007_pgbench_standby.pl
src/test/modules/test_checksums/t/008_pitr.pl
src/test/modules/test_checksums/t/DataChecksums/Utils.pm