File tree Expand file tree Collapse file tree 7 files changed +35
-0
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
16/root/usr/share/container-scripts/postgresql
src/root/usr/share/container-scripts/postgresql Expand file tree Collapse file tree 7 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,11 @@ function wait_for_postgresql_master() {
296296
297297run_pgupgrade ()
298298(
299+ # Remove .pid file if the file persists after ugly shut down
300+ if [ -f " $PGDATA /postmaster.pid" ] && ! pgrep -f " postgres" > /dev/null; then
301+ rm -rf " $PGDATA /postmaster.pid"
302+ fi
303+
299304 optimized=false
300305 old_raw_version=${POSTGRESQL_PREV_VERSION// \. / }
301306 new_raw_version=${POSTGRESQL_VERSION// \. / }
Original file line number Diff line number Diff line change @@ -296,6 +296,11 @@ function wait_for_postgresql_master() {
296296
297297run_pgupgrade ()
298298(
299+ # Remove .pid file if the file persists after ugly shut down
300+ if [ -f " $PGDATA /postmaster.pid" ] && ! pgrep -f " postgres" > /dev/null; then
301+ rm -rf " $PGDATA /postmaster.pid"
302+ fi
303+
299304 optimized=false
300305 old_raw_version=${POSTGRESQL_PREV_VERSION// \. / }
301306 new_raw_version=${POSTGRESQL_VERSION// \. / }
Original file line number Diff line number Diff line change @@ -296,6 +296,11 @@ function wait_for_postgresql_master() {
296296
297297run_pgupgrade ()
298298(
299+ # Remove .pid file if the file persists after ugly shut down
300+ if [ -f " $PGDATA /postmaster.pid" ] && ! pgrep -f " postgres" > /dev/null; then
301+ rm -rf " $PGDATA /postmaster.pid"
302+ fi
303+
299304 optimized=false
300305 old_raw_version=${POSTGRESQL_PREV_VERSION// \. / }
301306 new_raw_version=${POSTGRESQL_VERSION// \. / }
Original file line number Diff line number Diff line change @@ -296,6 +296,11 @@ function wait_for_postgresql_master() {
296296
297297run_pgupgrade ()
298298(
299+ # Remove .pid file if the file persists after ugly shut down
300+ if [ -f " $PGDATA /postmaster.pid" ] && ! pgrep -f " postgres" > /dev/null; then
301+ rm -rf " $PGDATA /postmaster.pid"
302+ fi
303+
299304 optimized=false
300305 old_raw_version=${POSTGRESQL_PREV_VERSION// \. / }
301306 new_raw_version=${POSTGRESQL_VERSION// \. / }
Original file line number Diff line number Diff line change @@ -296,6 +296,11 @@ function wait_for_postgresql_master() {
296296
297297run_pgupgrade ()
298298(
299+ # Remove .pid file if the file persists after ugly shut down
300+ if [ -f " $PGDATA /postmaster.pid" ] && ! pgrep -f " postgres" > /dev/null; then
301+ rm -rf " $PGDATA /postmaster.pid"
302+ fi
303+
299304 optimized=false
300305 old_raw_version=${POSTGRESQL_PREV_VERSION// \. / }
301306 new_raw_version=${POSTGRESQL_VERSION// \. / }
Original file line number Diff line number Diff line change @@ -296,6 +296,11 @@ function wait_for_postgresql_master() {
296296
297297run_pgupgrade ()
298298(
299+ # Remove .pid file if the file persists after ugly shut down
300+ if [ -f " $PGDATA /postmaster.pid" ] && ! pgrep -f " postgres" > /dev/null; then
301+ rm -rf " $PGDATA /postmaster.pid"
302+ fi
303+
299304 optimized=false
300305 old_raw_version=${POSTGRESQL_PREV_VERSION// \. / }
301306 new_raw_version=${POSTGRESQL_VERSION// \. / }
Original file line number Diff line number Diff line change @@ -297,6 +297,11 @@ function wait_for_postgresql_master() {
297297
298298run_pgupgrade ()
299299(
300+ # Remove .pid file if the file persists after ugly shut down
301+ if [ -f " $PGDATA /postmaster.pid" ] && ! pgrep -f " postgres" > /dev/null; then
302+ rm -rf " $PGDATA /postmaster.pid"
303+ fi
304+
300305 optimized=false
301306 old_raw_version=${POSTGRESQL_PREV_VERSION// \. / }
302307 new_raw_version=${POSTGRESQL_VERSION// \. / }
You can’t perform that action at this time.
0 commit comments