summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/amcheck/t/001_verify_heapam.pl2
-rw-r--r--src/bin/pg_amcheck/t/003_check.pl2
-rw-r--r--src/bin/pg_amcheck/t/004_verify_heapam.pl2
-rw-r--r--src/bin/pg_checksums/t/002_actions.pl2
-rw-r--r--src/test/perl/PostgreSQL/Test/Cluster.pm8
5 files changed, 12 insertions, 4 deletions
diff --git a/contrib/amcheck/t/001_verify_heapam.pl b/contrib/amcheck/t/001_verify_heapam.pl
index 481e4dbe4fe..ffe89b25a63 100644
--- a/contrib/amcheck/t/001_verify_heapam.pl
+++ b/contrib/amcheck/t/001_verify_heapam.pl
@@ -15,7 +15,7 @@ my $node;
# Test set-up
#
$node = PostgreSQL::Test::Cluster->new('test');
-$node->init;
+$node->init(no_data_checksums => 1);
$node->append_conf('postgresql.conf', 'autovacuum=off');
$node->start;
$node->safe_psql('postgres', q(CREATE EXTENSION amcheck));
diff --git a/src/bin/pg_amcheck/t/003_check.pl b/src/bin/pg_amcheck/t/003_check.pl
index d99b094dba8..2b57c4dbac1 100644
--- a/src/bin/pg_amcheck/t/003_check.pl
+++ b/src/bin/pg_amcheck/t/003_check.pl
@@ -120,7 +120,7 @@ sub perform_all_corruptions()
# Test set-up
$node = PostgreSQL::Test::Cluster->new('test');
-$node->init;
+$node->init(no_data_checksums => 1);
$node->append_conf('postgresql.conf', 'autovacuum=off');
$node->start;
$port = $node->port;
diff --git a/src/bin/pg_amcheck/t/004_verify_heapam.pl b/src/bin/pg_amcheck/t/004_verify_heapam.pl
index f6d2c5f7877..95fe6e6d3bd 100644
--- a/src/bin/pg_amcheck/t/004_verify_heapam.pl
+++ b/src/bin/pg_amcheck/t/004_verify_heapam.pl
@@ -181,7 +181,7 @@ my $aborted_xid;
# autovacuum workers visiting the table could crash the backend.
# Disable autovacuum so that won't happen.
my $node = PostgreSQL::Test::Cluster->new('test');
-$node->init;
+$node->init(no_data_checksums => 1);
$node->append_conf('postgresql.conf', 'autovacuum=off');
$node->append_conf('postgresql.conf', 'max_prepared_transactions=10');
diff --git a/src/bin/pg_checksums/t/002_actions.pl b/src/bin/pg_checksums/t/002_actions.pl
index 33e7fb53c5e..df926339909 100644
--- a/src/bin/pg_checksums/t/002_actions.pl
+++ b/src/bin/pg_checksums/t/002_actions.pl
@@ -88,7 +88,7 @@ sub check_relation_corruption
# Initialize node with checksums disabled.
my $node = PostgreSQL::Test::Cluster->new('node_checksum');
-$node->init();
+$node->init(no_data_checksums => 1);
my $pgdata = $node->data_dir;
# Control file should know that checksums are disabled.
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index 3f133cafbd9..110b53ba0dc 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -586,6 +586,8 @@ On Windows, we use SSPI authentication to ensure the same (by pg_regress
WAL archiving can be enabled on this node by passing the keyword parameter
has_archiving => 1. This is disabled by default.
+Data checksums can be forced off by passing no_data_checksums => 1.
+
postgresql.conf can be set up for replication by passing the keyword
parameter allows_streaming => 'logical' or 'physical' (passing 1 will also
suffice for physical replication) depending on type of replication that
@@ -618,6 +620,12 @@ sub init
push @{ $params{extra} }, shellwords($initdb_extra_opts_env);
}
+ # This should override user-supplied initdb options.
+ if ($params{no_data_checksums})
+ {
+ push @{ $params{extra} }, '--no-data-checksums';
+ }
+
mkdir $self->backup_dir;
mkdir $self->archive_dir;