PostgreSQL server wouldn't shutdown on Lion (Mac OS 10.7)

后端 未结 4 1155
深忆病人
深忆病人 2020-12-22 19:06

I installed PostgreSQL using Homebrew on Lion. It starts okay but wouldn\'t shutdown. I tried:

$ #started with
$ pg_ctl -D /usr/local/var/postgres -l /usr/lo         


        
4条回答
  •  自闭症患者
    2020-12-22 19:18

    Shutting down PostgreSQL Server with -m immediate is a dangerous way to do it, because “Immediate” mode will abort all server processes without a clean shutdown.

    This will lead to a recovery run on restart. Try to shutdown PostgreSQL with parameter -m fast instead. "Fast” mode does not wait for clients to disconnect and will terminate an online backup in progress. All active transactions are rolled back and clients are forcibly disconnected

    pg_ctl stop -D /usr/local/var/postgres -m fast 
    

    For more information about pg_ctl please visit http://www.postgresql.org/docs/9.0/static/app-pg-ctl.html

提交回复
热议问题