溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

postgresql關(guān)閉服務(wù)器的方法

發(fā)布時(shí)間:2020-07-16 13:45:00 來(lái)源:億速云 閱讀:381 作者:清晨 欄目:編程語(yǔ)言

這篇文章主要介紹postgresql關(guān)閉服務(wù)器的方法,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!

postgresql關(guān)閉服務(wù)器的方法:

[postgres@localhost ~]$ pg_ctl stop
waiting for server to shut down.... done
server stopped

pg_ctl stop

$ pg_ctl --help

Usage:
  pg_ctl stop    [-W] [-t SECS] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]

Common options:
  -D, --pgdata=DATADIR   location of the database storage area
  -s, --silent           only print errors, no informational messages
  -t, --timeout=SECS     seconds to wait when using -w option
  -V, --version          output version information, then exit
  -w                     wait until operation completes
  -W                     do not wait until operation completes
  
Options for stop or restart:
  -m, --mode=MODE        MODE can be "smart", "fast", or "immediate"

Shutdown modes are:
  smart       quit after all clients have disconnected
  fast        quit directly, with proper shutdown
  immediate   quit without complete shutdown; will lead to recovery on restart

Allowed signal names for kill:
  ABRT HUP INT QUIT TERM USR1 USR2

pg_ctl stop -m smart

SIGTERM "Smart"模式等待所有客戶端斷開連接以及任何在線備份結(jié)束。如果該服務(wù)器是熱備,一旦所有的客戶端已經(jīng)斷開連接,恢復(fù)和流復(fù)制將被終止。

pg_ctl stop -m fast

SIGINT "Fast"模式(默認(rèn))不會(huì)等待客戶端斷開連接并且將終止進(jìn)行中的在線備份。所有活動(dòng)事務(wù)都被回滾并且客戶端被強(qiáng)制斷開連接,然后服務(wù)器被關(guān)閉。

pg_ctl stop -m immediate

SIGQUIT "Immediate"模式將立刻中止所有服務(wù)器進(jìn)程,而不是做一次干凈的關(guān)閉。這將導(dǎo)致下一次重啟時(shí)進(jìn)行一次崩潰恢復(fù)。

以上是postgresql關(guān)閉服務(wù)器的方法的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI