Merge pull request #15082 from heww/fix-issue-15081

fix: listen to 5443 when clean unexpected status of db
This commit is contained in:
stonezdj(Daojun Zhang) 2021-06-08 17:25:13 +08:00 committed by GitHub
commit 8a9801a9d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ if [ "$(ls -A $PGDATA)" ]; then
# There seems to be a postmaster servicing the new cluster.
# Please shutdown that postmaster and try again.
# Failure, exiting
$PGBINOLD/pg_ctl -D "$PGDATAOLD" -w start
$PGBINOLD/pg_ctl -D "$PGDATAOLD" -w -o "-p 5433" start
$PGBINOLD/pg_ctl -D "$PGDATAOLD" -m fast -w stop
./$CUR/upgrade.sh --old-bindir $PGBINOLD --old-datadir $PGDATAOLD --new-datadir $PGDATANEW
# it needs to clean the $PGDATANEW on upgrade failure
@ -65,4 +65,4 @@ if [ $POSTGRES_MAX_CONNECTIONS -le 0 ] || [ $POSTGRES_MAX_CONNECTIONS -gt 262143
fi
POSTGRES_PARAMETER="${POSTGRES_PARAMETER} -c max_connections=${POSTGRES_MAX_CONNECTIONS}"
exec postgres -D $PGDATANEW $POSTGRES_PARAMETER
exec postgres -D $PGDATANEW $POSTGRES_PARAMETER