diff options
author | Tomas Vondra <tomas.vondra@postgresql.org> | 2024-06-30 19:26:12 +0200 |
---|---|---|
committer | Tomas Vondra <tomas.vondra@postgresql.org> | 2024-06-30 20:53:39 +0200 |
commit | 35a7b288b975f8b13084307c4b610e3bed5ca046 (patch) | |
tree | bbc856518145225c90f1115086375ecee97c4018 /src/test/perl/PostgreSQL/Test/Cluster.pm | |
parent | a9577bae6b5c88c6865597aacd33b93d1b17e497 (diff) | |
download | postgresql-35a7b288b975f8b13084307c4b610e3bed5ca046.tar.gz postgresql-35a7b288b975f8b13084307c4b610e3bed5ca046.zip |
Add PG_TEST_PG_COMBINEBACKUP_MODE
Introduces an environment variable PG_TEST_PG_COMBINEBACKUP_MODE, that
determines copy mode used by pg_combinebackup in TAP tests. Defaults to
"--copy" but may be set to "--clone" or "--copy-file-range" to use the
alternative stategies.
Reported-by: Peter Eisentraut
Discussion: https://postgr.es/m/48da4a1f-ccd9-4988-9622-24f37b1de2b4%40eisentraut.org
Diffstat (limited to 'src/test/perl/PostgreSQL/Test/Cluster.pm')
-rw-r--r-- | src/test/perl/PostgreSQL/Test/Cluster.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm index 83f385a4870..0135c5a795c 100644 --- a/src/test/perl/PostgreSQL/Test/Cluster.pm +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm @@ -856,6 +856,11 @@ sub init_from_backup push @combineargs, "-T$olddir=$newdir"; } } + # use the combine mode (clone/copy-file-range) if specified + if (defined $params{combine_mode}) + { + push @combineargs, $params{combine_mode}; + } push @combineargs, @prior_backup_path, $backup_path, '-o', $data_path; PostgreSQL::Test::Utils::system_or_bail(@combineargs); } |