小编dan*_*ish的帖子

Postgresql 流复制错误:WAL 段已删除

我想设置 PostgreSQL 流复制,但出现以下错误:

FATAL:  could not receive data from WAL stream: 
ERROR:  requested WAL segment 00000001000000000000006A has already been removed.
Run Code Online (Sandbox Code Playgroud)

主控IP:192.168.0.30

从机IP:192.168.0.36

关于大师:

我创建了一个rep仅用于复制的用户。

Postgres config 目录( )内的相关文件/opt/Postgres/9.3/data

pg_hba.conf:

host    replication     rep     192.168.0.36/32   trust
Run Code Online (Sandbox Code Playgroud)

postgresql.conf:

listen_addresses = 'localhost,192.168.0.30'
wal_level = 'hot_standby'
archive_mode = on
archive_command = 'cd .'
max_wal_senders = 1
hot_standby = on
Run Code Online (Sandbox Code Playgroud)

我已经重新启动了该postgres服务。

在从机上:

我已停止该postgres服务,然后将更改应用于两个文件:

pg_hba.conf:

host    replication     rep     192.168.0.30/32  trust
Run Code Online (Sandbox Code Playgroud)

postgresql.conf:

listen_addresses = 'localhost,192.168.0.36'
wal_level …
Run Code Online (Sandbox Code Playgroud)

postgresql replication postgresql-9.3

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

postgresql ×1

postgresql-9.3 ×1

replication ×1