2/XYZ 处记录的资源管理器数据校验和不正确 + 由于管理员命令而终止 walreceiver 进程

incorrect resource manager data checksum in record at 2/XYZ + terminating walreceiver process due to administrator command

我正在 运行使用 PostgreSQL 9.1(1 个主服务器,3 个从服务器)建立一个流复制环境。 aprox 一切正常。 2个月。昨天,复制到其中一个从站失败,从站上的日志有:

LOG:  incorrect resource manager data checksum in record at 61/DA2710A7
FATAL:  terminating walreceiver process due to administrator command
LOG:  incorrect resource manager data checksum in record at 61/DA2710A7
LOG:  incorrect resource manager data checksum in record at 61/DA2710A7
LOG:  incorrect resource manager data checksum in record at 61/DA2710A7
LOG:  incorrect resource manager data checksum in record at 61/DA2710A7
LOG:  incorrect resource manager data checksum in record at 61/DA2710A7
LOG:  incorrect resource manager data checksum in record at 61/DA2710A7
LOG:  incorrect resource manager data checksum in record at 61/DA2710A7

从站不再与主站同步。 两个小时后,其中日志每5秒换行如上,我重启了从数据库服务器:

LOG:  incorrect resource manager data checksum in record at 61/DA2710A7
LOG:  received fast shutdown request
LOG:  aborting any active transactions
LOG:  incorrect resource manager data checksum in record at 61/DA2710A7
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
LOG:  shutting down
LOG:  database system is shut down

slave 上的新日志文件包含:

LOG:  database system was shut down in recovery at 2016-02-29 05:12:11 CET
LOG:  entering standby mode
LOG:  redo starts at 61/D92C10C9
LOG:  consistent recovery state reached at  61/DA2710A7
LOG:  database system is ready to accept read only connections
LOG:  incorrect resource manager data checksum in record at 61/DA2710A7
LOG:  streaming replication successfully connected to primary

现在从站与主站同步,但校验和条目仍然存在。我检查的另一件事是网络日志 -> 网络可用。

我的问题是:

  1. 有谁知道为什么 walreceiver 被终止了?
  2. 为什么 PostgreSQL 没有重试复制?
  3. 以后我可以做些什么来防止这种情况发生?

谢谢。

编辑:

数据库服务器运行在带有 ext3 的 SLES 11 上运行。我发现了一篇关于大内存 SLES 11 性能低下的文章,但我不确定它是否适用,因为我的机器只有 8 GB 内存 (https://www.novell.com/support/kb/doc.php?id=7010287)

如有任何帮助,我们将不胜感激。

编辑 (2):

PostgreSQL 版本为 9.1.5。似乎 PostgreSQL 版本 9.1.6 提供了类似问题的修复程序?

Fix persistence marking of shared buffers during WAL replay (Jeff Davis)

This mistake can result in buffers not being written out during checkpoints, resulting in data corruption if the server later crashes without ever having written those buffers. Corruption can occur on any server following crash recovery, but it is significantly more likely to occur on standby slave servers since those perform much more WAL replay.

来源:http://www.postgresql.org/docs/9.1/static/release-9-1-6.html

这可能是解决方法吗?我应该升级到 PostgreSQL 9.1.6 并且一切都会 运行 顺利吗?

为了防止有人偶然发现这个问题,我最终从备份数据中重新安装了数据库并再次设置了复制。从来没有真正弄清楚哪里出了问题。

Never really figured out what went wrong.

我遇到了同样的错误 - 只是它从一开始就没有完全同步。

然后,主服务器出现了一些内核错误(服务器机箱散热问题?)。由于未完全关闭,服务器需要关闭。关闭时,奴隶出现

LOG:  incorrect resource manager data checksum in record at 1/63663CB0

重启主服务器和重启从服务器后,情况没有改变:每5秒相同的日志条目。