我有postgres 9.6
在我的代码中,我使用pg_rewind在故障转移后将旧主服务器与新主服务器同步。虽然pg_rewind没有返回错误,但我无法在旧主机上进行postgres。请在下面找到日志文件。
非常欢迎您的见解。 阿维
< 2017-09-24 15:27:59.364 GMT 28163 >LOG: database system was interrupted while in recovery at log time 2017-09-24 14:27:42 GMT
< 2017-09-24 15:27:59.364 GMT 28163 >HINT: If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.
< 2017-09-24 15:27:59.519 GMT 28163 >LOG: entering standby mode
< 2017-09-24 15:27:59.519 GMT 28163 >LOG: unexpected pageaddr 1/CC000000 in log segment 000000400000000200000012, offset 0
< 2017-09-24 15:27:59.528 GMT 28165 >LOG: started streaming WAL from primary at 2/12000000 on timeline 64
< 2017-09-24 15:27:59.530 GMT 28163 >LOG: unexpected pageaddr 1/CC000000 in log segment 000000400000000200000012, offset 0
< 2017-09-24 15:27:59.530 GMT 28165 >FATAL: terminating walreceiver process due to administrator command
< 2017-09-24 15:27:59.531 GMT 28163 >LOG: unexpected pageaddr 1/CC000000 in log segment 000000400000000200000012, offset 0
< 2017-09-24 15:27:59.531 GMT 28163 >LOG: unexpected pageaddr 1/CC000000 in log segment 000000400000000200000012, offset 0
< 2017-09-24 15:28:04.536 GMT 28163 >LOG: unexpected pageaddr 1/CC000000 in log segment 000000400000000200000012, offset 0
< 2017-09-24 15:28:09.541 GMT 28163 >LOG: unexpected pageaddr 1/CC000000 in log segment 000000400000000200000012, offset 0
< 2017-09-24 15:28:12.863 GMT 28224 >FATAL: the database system is starting up
< 2017-09-24 15:28:12.872 GMT 28225 >FATAL: the database system is starting up
some lines removed from here...
in log segment 000000400000000200000012, offset 0
< 2017-09-24 15:32:34.812 GMT 28163 >LOG: unexpected pageaddr 1/CC000000 in log segment 000000400000000200000012, offset 0
< 2017-09-24 15:32:39.818 GMT 28163 >LOG: unexpected pageaddr 1/CC000000 in log segment 000000400000000200000012, offset 0
< 2017-09-24 15:32:44.823 GMT 28163 >LOG: unexpected pageaddr 1/CC000000 in log segment 000000400000000200000012, offset 0
< 2017-09-24 15:32:49.828 GMT 28163 >LOG: unexpected pageaddr 1/CC000000 in log segment 000000400000000200000012, offset 0
< 2017-09-24 15:32:51.686 GMT 29118 >FATAL: the database system is starting up
< 2017-09-24 15:32:51.830 GMT 29119 >FATAL: the database system is starting up
< 2017-09-24 15:32:54.833 GMT 28163 >LOG: unexpected pageaddr 1/CC000000 in log segment 000000400000000200000012, offset 0
< 2017-09-24 15:32:59.234 GMT 28155 >LOG: received fast shutdown request
< 2017-09-24 15:32:59.237 GMT 29143 >LOG: shutting down
< 2017-09-24 15:32:59.350 GMT 28155 >LOG: database system is shut down
答案 0 :(得分:0)
我从版本9.6.3升级到9.6.5,问题似乎消失了。我检查了版本9.6.4和9.6.5的发行说明,并且有一个pg_rewind修复了大小超过2GB的文件中的问题,但是我的文件比这小,所以我不知道它是否与此修复有关。