How about
pg_ctl stop -m smart # smart = wait for all clients to disconnect
pg_ctl stop -m fast # fast = don't bother waiting,
rollback all transactions
pg_ctl stop -m immediate # immediate = abort all server processes
See pg_ctl(1)
ohnson, Shaunn wrote:
> Running PostgreSQL 7.2.1 on RedHat Linux 7.2.
>
> I think I may have asked before, but I never got an answer
> that told me one way or another -
>
> How can I kill processes without kill -9 <pid> and
> ruining the database?
>
> I've tried restarting postgreSQL hoping that it cleans up
> a few things. I've tried to simply kill the processes that
> were running. Nothing happens; nothing dies. I don't see
> much of anything in the messages / log files.
>
> Any suggestions?
>
> -X
>