mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Updates to reflect that pg_ctl stop -m fast is the default
Various example and test code used -m fast explicitly, but since it's the default, this can be omitted now or should be replaced by a better example. pg_upgrade is not touched, so it can continue to operate with older installations.
This commit is contained in:
@ -48,10 +48,10 @@ case $1 in
|
||||
echo -n ' postgresql'
|
||||
;;
|
||||
stop)
|
||||
su -l $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -m fast"
|
||||
su -l $PGUSER -c "$PGCTL stop -D '$PGDATA' -s"
|
||||
;;
|
||||
restart)
|
||||
su -l $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -m fast -w"
|
||||
su -l $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -w"
|
||||
su -l $PGUSER -c "$DAEMON -D '$PGDATA' &" >>$PGLOG 2>&1
|
||||
;;
|
||||
status)
|
||||
|
@ -97,12 +97,12 @@ case $1 in
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping PostgreSQL: "
|
||||
su - $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -m fast"
|
||||
su - $PGUSER -c "$PGCTL stop -D '$PGDATA' -s"
|
||||
echo "ok"
|
||||
;;
|
||||
restart)
|
||||
echo -n "Restarting PostgreSQL: "
|
||||
su - $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -m fast -w"
|
||||
su - $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -w"
|
||||
test -e "$PG_OOM_ADJUST_FILE" && echo "$PG_MASTER_OOM_SCORE_ADJ" > "$PG_OOM_ADJUST_FILE"
|
||||
su - $PGUSER -c "$DAEMON_ENV $DAEMON -D '$PGDATA' &" >>$PGLOG 2>&1
|
||||
echo "ok"
|
||||
|
@ -90,14 +90,14 @@ StartService () {
|
||||
|
||||
StopService () {
|
||||
ConsoleMessage "Stopping PostgreSQL database server"
|
||||
sudo -u $PGUSER sh -c "$PGCTL stop -D '${PGDATA}' -s -m fast"
|
||||
sudo -u $PGUSER sh -c "$PGCTL stop -D '${PGDATA}' -s"
|
||||
}
|
||||
|
||||
RestartService () {
|
||||
if [ "${POSTGRESQL:=-NO-}" = "-YES-" ]; then
|
||||
ConsoleMessage "Restarting PostgreSQL database server"
|
||||
# should match StopService:
|
||||
sudo -u $PGUSER sh -c "$PGCTL stop -D '${PGDATA}' -s -m fast"
|
||||
sudo -u $PGUSER sh -c "$PGCTL stop -D '${PGDATA}' -s"
|
||||
# should match StartService:
|
||||
if [ "${ROTATELOGS}" = "1" ]; then
|
||||
sudo -u $PGUSER sh -c "${DAEMON} -D '${PGDATA}' &" 2>&1 | ${LOGUTIL} "${PGLOG}" ${ROTATESEC} &
|
||||
|
Reference in New Issue
Block a user