免费观看又色又爽又黄的小说免费_美女福利视频国产片_亚洲欧美精品_美国一级大黄大色毛片

【PostgreSQL】數據庫復制

異步流復制
[root@wallet01?~]#?su?-?postgres
[postgres@wallet01?~]$?vi?/var/lib/pgsql/9.6/data/pg_hba.conf
host????replication?????postgres????????192.168.1.0/24??????????md5

[postgres@wallet01?~]$?vi?/var/lib/pgsql/9.6/data/postgresql.conf
listen_addresses?=?'0.0.0.0'
max_wal_senders?=?5
wal_level?=?hot_standby?

[postgres@wallet01?~]$?pg_ctl?restart
waiting?for?server?to?shut?down....?done
server?stopped
server?starting

[root@wallet02?~]#?su?-?postgres
[postgres@wallet02?~]$?pg_basebackup?-h?192.168.1.201?-U?postgres?-F?p?-P?-x?-R?-D?/var/lib/pgsql/9.6/data?
Password:?
2161085/2161085?kB?(100%),?1/1?tablespace

[postgres@wallet02?~]$?vi?/var/lib/pgsql/9.6/data/postgresql.conf
hot_standby?=?on

[postgres@wallet02?~]$?vi?/var/lib/pgsql/9.6/data/recovery.conf
standby_mode?=?'on'
primary_conninfo?=?'user=postgres?password=postgres?host=192.168.1.201?port=5432?sslmode=disable?
sslcompression=1?krbsrvname=postgres'

[postgres@wallet02?~]$?pg_ctl?start
server?starting

[postgres@wallet01?~]$?psql
psql?(9.6.12)
Type?"help"?for?help.

postgres=#?select?pid,state,client_addr,sync_priority,sync_state?from?pg_stat_replication;
?pid??|???state???|??client_addr??|?sync_priority?|?sync_state?
------+-----------+---------------+---------------+------------
?2055?|?streaming?|?192.168.1.202?|?????????????0?|?async
(1?row)

網站建設公司,為您提供網站建設,網站制作,網頁設計及定制網站建設服務,專注于成都定制網站,高端網頁制作,對成都混凝土攪拌罐車等多個行業擁有豐富的網站建設經驗的網站建設公司。專業網站設計,網站優化推廣哪家好,專業seo優化優化,H5建站,響應式網站。

同步流復制
[root@wallet01?~]#?su?-?postgres
[postgres@wallet01?~]$?vi?/var/lib/pgsql/9.6/data/pg_hba.conf
host????replication?????postgres????????192.168.1.0/24??????????md5

[postgres@wallet01?~]$?vi?/var/lib/pgsql/9.6/data/postgresql.conf
max_wal_senders?=?5?
wal_level?=?hot_standby
synchronous_standby_names?=?'wallet02,wallet03'

[root@wallet01?~]#?su?-?postgres
[postgres@wallet01?~]$?pg_ctl?reload
server?signaled

[root@wallet02?~]#?su?-?postgres
[postgres@wallet02?~]$?pg_basebackup?-h?192.168.1.201?-U?postgres?-F?p?-P?-x?-R?-D?/var/lib/pgsql/9.6/data?
Password:?
2161085/2161085?kB?(100%),?1/1?tablespace

[postgres@wallet02?~]$?vi?/var/lib/pgsql/9.6/data/postgresql.conf
hot_standby?=?on

[postgres@wallet02?~]$?vi?/var/lib/pgsql/9.6/data/recovery.conf
standby_mode?=?'on'
primary_conninfo?=?'application_name=wallet02?user=postgres?password=postgres?host=192.168.1.201?port=5432?sslmode=disable?sslcompression=1'

[postgres@wallet02?~]$??pg_ctl?start
server?starting

[root@wallet03?~]#?su?-?postgres
[postgres@wallet03?~]$?pg_basebackup?-h?192.168.1.201?-U?postgres?-F?p?-P?-x?-R?-D?/var/lib/pgsql/9.6/data?
Password:?
2161215/2161215?kB?(100%),?1/1?tablespace

[postgres@wallet03?~]$?vi?/var/lib/pgsql/9.6/data/postgresql.conf
hot_standby?=?on

[postgres@wallet03?~]$?vi?/var/lib/pgsql/9.6/data/recovery.conf
standby_mode?=?'on'
primary_conninfo?=?'application_name=wallet03?user=postgres?password=postgres?host=192.168.1.201?port=5432?sslmode=disable?sslcompression=1'

[postgres@wallet03?~]$??pg_ctl?start
server?starting

[postgres@wallet01?~]$?psql
psql?(9.6.12)
Type?"help"?for?help.
postgres=#?select?pid,state,client_addr,sync_priority,sync_state?from?pg_stat_replication;
?pid??|???state???|??client_addr??|?sync_priority?|?sync_state?
------+-----------+---------------+---------------+------------
?1968?|?streaming?|?192.168.1.202?|?????????????1?|?sync
?2018?|?streaming?|?192.168.1.203?|?????????????2?|?potential

分享文章:【PostgreSQL】數據庫復制
文章出自:http://m.newbst.com/article12/gejjdc.html

成都網站建設公司_創新互聯,為您提供品牌網站制作、網站營銷、商城網站、電子商務、建站公司企業建站

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

成都app開發公司