我对皮卡很陌生,所以请耐心点。
我已经设置了两个主机,并在这两个主机上安装了pg10。然后,我在它们之间配置了日志流复制。这个效果很好。
我想测试失败转移,所以我停止了postgresql服务的主,并创建触发文件的待机,这也是工作的查找。我检查,我的待机不再处于恢复模式。
现在我想恢复旧的主,作为新的备用。我尝试使用pg_rewind,但它给出了以下错误消息
/usr/lib/postgresql/10/bin/pg_rewind --target-pgdata=/var/lib/postgresql/10/main --source-server="host=server2ip port=5432 user=postgres"
target server needs to use either data checksums or "wal_log_hints = on"
Failure, exiting我在两台服务器上都设置了wal_log_hints = on。
有谁能帮我弄清楚怎么让它起作用吗。
下面是我的设置,在两个服务器上都是相同的。失败“主”之前的复制效果很好。
下面是我在postgresql .conf中更改的行
listen_addresses = '*'
max_connections = 200
tcp_keepalives_idle = 60
tcp_keepalives_interval = 10
tcp_keepalives_count = 5
wal_level = replica
wal_log_hints = on
archive_mode = on
archive_command = '/bin/true'
max_wal_senders = 5
wal_keep_segments = 5000
max_replication_slots = 5
effective_cache_size = 2GB我还将下面的行添加到pg_hba.conf文件中
host all postgres server1ip/24 trust
host all postgres server2ip/24 trust最后,我创建recovery.conf文件,如下所示。
standby_mode = 'on'
primary_conninfo = 'host=sciontsdbbc01 port=5432 user=replicate password=rep-password'
trigger_file = '/tmp/PG_MasterNow'发布于 2019-03-28 10:33:38
我在两台服务器上都设置了wal_log_hints = on。
但是,它可能设置得太晚了,也就是说,在生成了至少一些与倒带有关的WAL文件之后(在pg_wal目录中)。
https://dba.stackexchange.com/questions/233350
复制相似问题