Forum OpenACS Q&A: Response to killing postgres while aolserver running

Posted by Don Baccus on
The best way to kill the postmaster is to use pg_ctl.  I kill it like this:

pg_ctl stop -m fast

this rolls back any transaction underway rather than let them complete, which is useful if you've accidently started the RDBMS off on a cross join of two large tables, etc.

I'm a stone-aged sysadmin myself, being too lazy to learn new tricks.  I just edit /etc/inittab, kill -TERM aolserver, then stop the postmaster, restart it, edit /etc/inittab and do a "telinit q".

Be careful, the "1" key is surprisingly near the "q" key.  I know someone who typed "telinit 1" by accident and ended up having to get the datacenter staff to reboot the server ...

All this is probably bad advice that will make up-to-date sysadmin types cringe, but that's how I do it.