1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-24 00:23:06 +03:00

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
This commit is contained in:
Tomas Vondra
2024-06-30 19:26:12 +02:00
parent a9577bae6b
commit 35a7b288b9
6 changed files with 48 additions and 15 deletions

View File

@@ -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);
}