File tree Expand file tree Collapse file tree 6 files changed +12
-6
lines changed
10/root/usr/share/container-scripts/postgresql
12/root/usr/share/container-scripts/postgresql
13/root/usr/share/container-scripts/postgresql
14/root/usr/share/container-scripts/postgresql
15/root/usr/share/container-scripts/postgresql
src/root/usr/share/container-scripts/postgresql Expand file tree Collapse file tree 6 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -248,9 +248,9 @@ migrate_db ()
248248{
249249 test " $postinitdb_actions " = " ,migration" || return 0
250250
251+ set -o pipefail
251252 # Migration path.
252253 (
253- set -o pipefail
254254 if [ ${POSTGRESQL_MIGRATION_IGNORE_ERRORS-no} = no ]; then
255255 echo ' \set ON_ERROR_STOP on'
256256 fi
@@ -260,6 +260,7 @@ migrate_db ()
260260 pg_dumpall -h " $POSTGRESQL_MIGRATION_REMOTE_HOST " \
261261 | grep -v ' ^CREATE ROLE postgres;'
262262 ) | psql
263+ set +o pipefail
263264}
264265
265266function set_pgdata ()
Original file line number Diff line number Diff line change @@ -248,9 +248,9 @@ migrate_db ()
248248{
249249 test " $postinitdb_actions " = " ,migration" || return 0
250250
251+ set -o pipefail
251252 # Migration path.
252253 (
253- set -o pipefail
254254 if [ ${POSTGRESQL_MIGRATION_IGNORE_ERRORS-no} = no ]; then
255255 echo ' \set ON_ERROR_STOP on'
256256 fi
@@ -260,6 +260,7 @@ migrate_db ()
260260 pg_dumpall -h " $POSTGRESQL_MIGRATION_REMOTE_HOST " \
261261 | grep -v ' ^CREATE ROLE postgres;'
262262 ) | psql
263+ set +o pipefail
263264}
264265
265266function set_pgdata ()
Original file line number Diff line number Diff line change @@ -248,9 +248,9 @@ migrate_db ()
248248{
249249 test " $postinitdb_actions " = " ,migration" || return 0
250250
251+ set -o pipefail
251252 # Migration path.
252253 (
253- set -o pipefail
254254 if [ ${POSTGRESQL_MIGRATION_IGNORE_ERRORS-no} = no ]; then
255255 echo ' \set ON_ERROR_STOP on'
256256 fi
@@ -260,6 +260,7 @@ migrate_db ()
260260 pg_dumpall -h " $POSTGRESQL_MIGRATION_REMOTE_HOST " \
261261 | grep -v ' ^CREATE ROLE postgres;'
262262 ) | psql
263+ set +o pipefail
263264}
264265
265266function set_pgdata ()
Original file line number Diff line number Diff line change @@ -248,9 +248,9 @@ migrate_db ()
248248{
249249 test " $postinitdb_actions " = " ,migration" || return 0
250250
251+ set -o pipefail
251252 # Migration path.
252253 (
253- set -o pipefail
254254 if [ ${POSTGRESQL_MIGRATION_IGNORE_ERRORS-no} = no ]; then
255255 echo ' \set ON_ERROR_STOP on'
256256 fi
@@ -260,6 +260,7 @@ migrate_db ()
260260 pg_dumpall -h " $POSTGRESQL_MIGRATION_REMOTE_HOST " \
261261 | grep -v ' ^CREATE ROLE postgres;'
262262 ) | psql
263+ set +o pipefail
263264}
264265
265266function set_pgdata ()
Original file line number Diff line number Diff line change @@ -248,9 +248,9 @@ migrate_db ()
248248{
249249 test " $postinitdb_actions " = " ,migration" || return 0
250250
251+ set -o pipefail
251252 # Migration path.
252253 (
253- set -o pipefail
254254 if [ ${POSTGRESQL_MIGRATION_IGNORE_ERRORS-no} = no ]; then
255255 echo ' \set ON_ERROR_STOP on'
256256 fi
@@ -260,6 +260,7 @@ migrate_db ()
260260 pg_dumpall -h " $POSTGRESQL_MIGRATION_REMOTE_HOST " \
261261 | grep -v ' ^CREATE ROLE postgres;'
262262 ) | psql
263+ set +o pipefail
263264}
264265
265266function set_pgdata ()
Original file line number Diff line number Diff line change @@ -249,9 +249,9 @@ migrate_db ()
249249{
250250 test " $postinitdb_actions " = " ,migration" || return 0
251251
252+ set -o pipefail
252253 # Migration path.
253254 (
254- set -o pipefail
255255 if [ ${POSTGRESQL_MIGRATION_IGNORE_ERRORS-no} = no ]; then
256256 echo ' \set ON_ERROR_STOP on'
257257 fi
@@ -261,6 +261,7 @@ migrate_db ()
261261 pg_dumpall -h " $POSTGRESQL_MIGRATION_REMOTE_HOST " \
262262 | grep -v ' ^CREATE ROLE postgres;'
263263 ) | psql
264+ set +o pipefail
264265}
265266
266267function set_pgdata ()
You can’t perform that action at this time.
0 commit comments