File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -44,3 +44,6 @@ properties:
44
44
postgres.client_certificate_key:
45
45
default: ''
46
46
description: "Secret key used for the client certificate. Specify it if you want to auhtenticate using certificates."
47
+ postgres.single-transaction:
48
+ default: false
49
+ description: "uses singele transaction when restoring databases"
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ export_as_private_temp_file "$JOB_DIR/config/pgpass" PGPASSFILE
23
23
export_as_private_temp_file " $JOB_DIR /config/client_certificate_key" PGSSLKEY
24
24
< % end %>
25
25
26
+ SINGLE_TRANSACTION=
27
+ < % if p(" postgres.single-transaction" ) %>
28
+ SINGLE_TRANSACTION=" --single-transaction"
29
+ < % end %>
30
+
26
31
for dbname in ${DATABASES[@]} ; do
27
32
BBR_ARTIFACT_FILE_PATH=" ${BBR_ARTIFACT_DIRECTORY} /postgres_${dbname} .sql"
28
33
if [ -f " ${BBR_ARTIFACT_FILE_PATH} " ]; then
@@ -41,6 +46,7 @@ for dbname in ${DATABASES[@]}; do
41
46
--use-list=${TMP_LIST_FILE} \
42
47
--if-exists \
43
48
--clean \
49
+ ${SINGLE_TRANSACTION} \
44
50
" ${BBR_ARTIFACT_FILE_PATH} "
45
51
else
46
52
echo " WARNING: Not restoring ${dbname} because backup file ${BBR_ARTIFACT_FILE_PATH} does not exist"
You can’t perform that action at this time.
0 commit comments