update
This commit is contained in:
parent
a2e0b1eac2
commit
251fbcd782
@ -41,12 +41,12 @@
|
|||||||
- 增加主库配置
|
- 增加主库配置
|
||||||
```
|
```
|
||||||
echo '
|
echo '
|
||||||
wal_level = hot_standby
|
wal_level = hot_standby
|
||||||
max_wal_senders = 8
|
max_wal_senders = 8
|
||||||
wal_keep_size = 512
|
wal_keep_size = 512
|
||||||
wal_sender_timeout = 60s
|
wal_sender_timeout = 60s
|
||||||
max_connections = 100
|
max_connections = 100
|
||||||
' > pgsql1/conf.d/replication.conf
|
' > pgsql1/conf.d/replication.conf
|
||||||
|
|
||||||
- 重启 pgsql1 数据库
|
- 重启 pgsql1 数据库
|
||||||
```
|
```
|
||||||
@ -77,15 +77,15 @@ max_connections = 100
|
|||||||
- 增加从库配置
|
- 增加从库配置
|
||||||
```
|
```
|
||||||
echo '
|
echo '
|
||||||
primary_conninfo = 'host=pgsql1 port=5432 user=replicator'
|
primary_conninfo = 'host=pgsql1 port=5432 user=replicator'
|
||||||
recovery_target_timeline = latest
|
recovery_target_timeline = latest
|
||||||
hot_standby = on
|
hot_standby = on
|
||||||
max_standby_streaming_delay = 30s
|
max_standby_streaming_delay = 30s
|
||||||
wal_receiver_status_interval = 10s
|
wal_receiver_status_interval = 10s
|
||||||
hot_standby_feedback = on
|
hot_standby_feedback = on
|
||||||
max_connections = 200
|
max_connections = 200
|
||||||
max_worker_processes = 20
|
max_worker_processes = 20
|
||||||
' > pgsql2/conf.d/replication.conf
|
' > pgsql2/conf.d/replication.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
- 启动 pgsql2 数据库
|
- 启动 pgsql2 数据库
|
||||||
|
Loading…
x
Reference in New Issue
Block a user