Skip to content

Commit b23cc7c

Browse files
committed
add singel-transaction option
1 parent e19399d commit b23cc7c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

jobs/bbr-postgres-db/spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@ properties:
4444
postgres.client_certificate_key:
4545
default: ''
4646
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"

jobs/bbr-postgres-db/templates/restore.sh.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ for dbname in ${DATABASES[@]}; do
4141
--use-list=${TMP_LIST_FILE} \
4242
--if-exists \
4343
--clean \
44+
<% if p("postgres.single-transaction") %>
45+
--single-transaction \
46+
<% end %>
4447
"${BBR_ARTIFACT_FILE_PATH}"
4548
else
4649
echo "WARNING: Not restoring ${dbname} because backup file ${BBR_ARTIFACT_FILE_PATH} does not exist"

0 commit comments

Comments
 (0)