[Slackbuilds-users] PostgreSQL init script stop/restart options
Robby Workman
rworkman at slackbuilds.org
Sun May 31 22:38:47 UTC 2009
On Sun, 31 May 2009 21:48:53 +0200
Adis Nezirovic <adis at linux.org.ba> wrote:
> Hello,
>
> Last week I've had interesing suggestion for PostgreSQL init script.
> The main issue is that pg_ctl, utility that starts Postgres, has three
> modes of operation:
>
> ---
> Three different shutdown methods can be selected with the -m option:
> - "Smart" mode waits for all the clients to disconnect. This is the
> default.
> - "Fast" mode does not wait for clients to disconnect. All active
> transactions are rolled back and clients are forcibly disconnected,
> then the server is shut down.
> - "Immediate" mode will abort all server processes without a clean
> shutdown. This will lead to a recovery run on restart.
> ---
>
> Current init script uses explicit '-m smart' option. And for users it
> looks like this:
> /etc/rc.d/rc.postgres {stop|restart}
>
>
> Sometimes, one needs to force server restart, (e.g PHP script gone
> bad, and it uses persistent connections) but "smart" option doesn't
> want to kill active connections.)
>
> Anyway, my first idea was to use something like this
>
> /etc/rc.d/rc.postgres {stop|restart} [smart|fast|immediate]
>
> (smart is the default and can be ommited)
> It's somewhat strange syntax for init script, but other options should
> be used only for extreme situations, especially immediate).
>
>
> Other proposal would be:
>
> /etc/rc.d/rc.postgres {restart|force-restart|unclean-restart}
> /etc/rc.d/rc.postgres {stop|force-stop|unclean-stop}
>
>
> What do you think, what's the proper way to treat "advanced" init
> script actions?
I personally like the second block better.
-RW
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20090531/0aa6d72a/attachment.asc>
More information about the SlackBuilds-users
mailing list