,因热备服务器上的只读查询失败,我们只是成功将一个主服务器备份到热备服务器上。然而,当我们试图查询到双机热备,我们得到以下错误:由于获取事务标识
ERROR: cannot assign TransactionIds during recovery
我启用详细模式,并看到varsup.c出现错误:72
/* safety check, we should never get this far in a HS standby */
if (RecoveryInProgress())
elog(ERROR, "cannot assign TransactionIds during recovery");
奇怪的是,如果我们使用psql客户端并发出多个读取查询,第一个将失败,但所有后续的将成功。
pipeline=# SELECT pg_is_in_recovery();
ERROR: cannot assign TransactionIds during recovery
pipeline=# SELECT pg_is_in_recovery();
pg_is_in_recovery
-------------------
t
(1 row)
使用的Postgres 9.5.3
任何想法将不胜感激它。
BTW: 我们增加了: hot_standby = on
到pipelinedb.conf(相当于postgresql.conf中)
和我们说:
primary_slot_name = 'replicator_slot'
primary_conninfo = 'user=username host=ip_address port=5432'
recovery_target_timeline = 'latest'
到的recovery.conf
感谢提示保罗,但我们不希望热备用退出恢复。理想情况下,它始终处于恢复状态,并帮助主/主机运行只读查询。 –