gpt4 book ai didi

replication - 热备服务器上的只读查询因获取事务ID而失败

转载 作者:行者123 更新时间:2023-12-04 02:51:59 26 4
gpt4 key购买 nike

我们刚刚成功地将一个主服务器备份到了一个热备服务器上。但是,当我们尝试查询热备时,会出现以下错误:

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

任何想法将不胜感激。

顺便提一句:
我们添加了: 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

最佳答案

我们目前正在调查 the issue你为我们写的那么周到。解决后我会在此处发布更新,这应该不会太久

关于replication - 热备服务器上的只读查询因获取事务ID而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46375091/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com