diff options
Diffstat (limited to 'system/postgresql/rc.postgresql.new')
-rw-r--r-- | system/postgresql/rc.postgresql.new | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/system/postgresql/rc.postgresql.new b/system/postgresql/rc.postgresql.new index 347fe28019..5eef25badd 100644 --- a/system/postgresql/rc.postgresql.new +++ b/system/postgresql/rc.postgresql.new @@ -81,11 +81,39 @@ case "$1" in pg_ctl stop -l $LOGFILE -D $DATADIR -m smart ;; + "force-stop") + # Take care! This will kill _all_ client connections + # and rollback current transactions. + echo "Shutting down PostgreSQL (fast)..." + pg_ctl stop -l $LOGFILE -D $DATADIR -m fast + ;; + + "unclean-stop") + # Take care: This will abort server process itself + # resulting with database recovery on next start. + echo "Shutting down PostgreSQL (immediate)..." + pg_ctl stop -l $LOGFILE -D $DATADIR -m immediate + ;; + "restart") echo "Restarting PostgreSQL..." pg_ctl restart -l $LOGFILE -D $DATADIR -m smart ;; + "force-restart") + # Take care! This will kill _all_ client connections + # and rollback current transactions. + echo "Restarting PostgreSQL (fast)..." + pg_ctl restart -l $LOGFILE -D $DATADIR -m fast + ;; + + "unclean-restart") + # Take care: This will abort server process itself + # resulting with database recovery on start. + echo "Restarting PostgreSQL (immediate)..." + pg_ctl restart -l $LOGFILE -D $DATADIR -m immediate + ;; + "reload") echo "Reloading configuration for PostgreSQL..." pg_ctl reload -l $LOGFILE -D $DATADIR -m smart @@ -112,7 +140,8 @@ case "$1" in ;; *) - echo "Usage: $0 {start|stop|status|restart|reload}" + # unclean-stop and unclean-restart are not documented on purpose. + echo "Usage: $0 {start|stop|force-stop|status|restart|force-restart|reload}" exit 1 ;; esac |