創(chuàng)新互聯www.cdcxhl.cn八線動態(tài)BGP香港云服務器提供商,新人活動買多久送多久,劃算不套路!
創(chuàng)新互聯主營古塔網站建設的網絡公司,主營網站建設方案,重慶App定制開發(fā),古塔h5微信平臺小程序開發(fā)搭建,古塔網站營銷推廣歡迎古塔等地區(qū)企業(yè)咨詢小編給大家分享一下postgresql異常后如何重啟,希望大家閱讀完這篇文章后大所收獲,下面讓我們一起去探討吧!
重啟postgres最簡單的方法是使用postgres命令
服務器必須由PostgreSQL用戶帳戶運行,而不是由root用戶或任何其他用戶運行,所以先確認切換為postgres用戶
postgres@me:/usr/local/pgsql$ ./bin/postgres -D ./data
這個命令使得數據庫在前臺運行,為了使得運維數據庫更加方便,包裝程序pg_ctl將簡化一些操作,先看看pg_ctl的幫助信息:
postgres@me:/usr/local/pgsql$ ./bin/pg_ctl --help pg_ctl is a utility to initialize, start, stop, or control a PostgreSQL server. Usage: pg_ctl init[db] [-D DATADIR] [-s] [-o OPTIONS] pg_ctl start [-D DATADIR] [-l FILENAME] [-W] [-t SECS] [-s] [-o OPTIONS] [-p PATH] [-c] pg_ctl stop [-D DATADIR] [-m SHUTDOWN-MODE] [-W] [-t SECS] [-s] pg_ctl restart [-D DATADIR] [-m SHUTDOWN-MODE] [-W] [-t SECS] [-s] [-o OPTIONS] [-c] pg_ctl reload [-D DATADIR] [-s] pg_ctl status [-D DATADIR] pg_ctl promote [-D DATADIR] [-W] [-t SECS] [-s] pg_ctl kill SIGNALNAME PID 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 wait until operation completes (default) -W, --no-wait do not wait until operation completes -?, --help show this help, then exit If the -D option is omitted, the environment variable PGDATA is used. Options for start or restart: -c, --core-files allow postgres to produce core files -l, --log=FILENAME write (or append) server log to FILENAME -o, --options=OPTIONS command line options to pass to postgres (PostgreSQL server executable) or initdb -p PATH-TO-POSTGRES normally not necessary 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 (default) 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是一個集初始化,啟動,停止,或者控制PostgreSQL服務器于一體的實用程序。
看完了這篇文章,相信你對postgresql異常后如何重啟有了一定的了解,想了解更多相關知識,歡迎關注創(chuàng)新互聯-成都網站建設公司行業(yè)資訊頻道,感謝各位的閱讀!
新聞標題:postgresql異常后如何重啟-創(chuàng)新互聯
文章網址:http://aaarwkj.com/article48/hojhp.html
成都網站建設公司_創(chuàng)新互聯,為您提供網站策劃、ChatGPT、微信小程序、網頁設計公司、外貿網站建設、用戶體驗
聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯