Skip to content

Commit 033ea05

Browse files
tecrisEugen CRISTEA
andauthored
Healthcheck upgrade lock file path fix (#196)
Co-authored-by: Eugen CRISTEA <eugen.cristea@prolion.com>
1 parent 6dc3e52 commit 033ea05

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

postgres-docker-entrypoint.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,17 @@ _main() {
514514
echo "Moving existing data files into OLD temporary directory"
515515
echo "-------------------------------------------------------"
516516
if [ $MOVING_TO_NEW_STRUCTURE -eq 0 ]; then
517-
find "${PGDATA}" -mindepth 1 -maxdepth 1 -not -name "old" -exec mv {} "${OLD}/" \;
517+
find "${PGDATA}" \
518+
-mindepth 1 -maxdepth 1 \
519+
-not -name "old" \
520+
-not -name "upgrade_in_progress.lock" \
521+
-exec mv {} "${OLD}/" \;
518522
else
519-
find /var/lib/postgresql -mindepth 1 -maxdepth 1 -not -name 18 -exec mv {} "${OLD}/" \;
523+
find /var/lib/postgresql \
524+
-mindepth 1 -maxdepth 1 \
525+
-not -name 18 \
526+
-not -name "upgrade_in_progress.lock" \
527+
-exec mv {} "${OLD}/" \;
520528
fi
521529
echo "-------------------------------------------------------------------"
522530
echo "Moving existing data files into OLD temporary directory is complete"

0 commit comments

Comments
 (0)