91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

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

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

【PostgreSQL】數據庫復制

發布時間:2020-03-11 05:27:59 來源:網絡 閱讀:415 作者:NOGYMS 欄目:數據庫
異步流復制
[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)


同步流復制
[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


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

禹城市| 民丰县| 绥德县| 栾川县| 桃园县| 襄城县| 衡水市| 化隆| 子长县| 射阳县| 延津县| 娄底市| 湾仔区| 招远市| 寿阳县| 大兴区| 衡南县| 屏东市| 牡丹江市| 舟山市| 灵武市| 百色市| 苗栗市| 武邑县| 南澳县| 南充市| 合川市| 麦盖提县| 陈巴尔虎旗| 昌平区| 河间市| 蚌埠市| 辽宁省| 东宁县| 翁牛特旗| 淮北市| 肇源县| 永年县| 白银市| 平罗县| 甘洛县|