level 1
寄语落花何处去
楼主
主库: windows service 2008R2 postgreSQL12.4
从库: readhat7 postgreSQL12.1
原因:搭建完异步流复制组从后,尝试着主备切换,再次切换时报错时间线和服务不匹配
报错如下:
2020-09-21 14:44:41.676 CST [88739] FATAL: could not start WAL streaming: ERROR: requested timeline 2 is not in this server's history
2020-09-21 14:44:41.708 CST [88740] FATAL: could not start WAL streaming: ERROR: requested timeline 2 is not in this server's history
当时反应用时间线pg_rewind去同步时间线。
[postgres@dai log]$ pg_rewind --target-pgdata=$PGDATA --source-server='host=192.168.99.10 port=5432 user=repl dbname=postgres password=Dlh970622' -P --debug
pg_rewind: connected to server
pg_rewind: fatal: could not fetch remote file "global/pg_control": ERROR: permission denied for function pg_read_binary_file
不知道如何解决,但是如果rewind的机制时类似与scp那是不是直接拷贝部分内容就好了?
2020年09月21日 06点09分
1
从库: readhat7 postgreSQL12.1
原因:搭建完异步流复制组从后,尝试着主备切换,再次切换时报错时间线和服务不匹配
报错如下:
2020-09-21 14:44:41.676 CST [88739] FATAL: could not start WAL streaming: ERROR: requested timeline 2 is not in this server's history
2020-09-21 14:44:41.708 CST [88740] FATAL: could not start WAL streaming: ERROR: requested timeline 2 is not in this server's history
当时反应用时间线pg_rewind去同步时间线。
[postgres@dai log]$ pg_rewind --target-pgdata=$PGDATA --source-server='host=192.168.99.10 port=5432 user=repl dbname=postgres password=Dlh970622' -P --debug
pg_rewind: connected to server
pg_rewind: fatal: could not fetch remote file "global/pg_control": ERROR: permission denied for function pg_read_binary_file
不知道如何解决,但是如果rewind的机制时类似与scp那是不是直接拷贝部分内容就好了?