代码之家  ›  专栏  ›  技术社区  ›  leoOrion

Pgpool未恢复连接

  •  3
  • leoOrion  · 技术社区  · 7 年前

    • web1(主数据库)
    • 管理(Im连接的节点)

    我的 pgpool 设置为web1和web2上的数据库之间的负载平衡。它运行良好,即使其中一个断开,我也可以连接到db pgpool公司 pgpool公司 .

    现在,当我再次启动主数据库时,我假设 pgpool公司 应该重新建立这种联系,但事实并非如此。即使我的假设是错误的,我怎么能 pgpool公司 要再次在web1和web2上连接到我的db?

    目前在两个数据库都关闭后,我收到了消息-

    server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
    The connection to the server was lost. Attempting reset: Failed.
    

    当我再次恢复数据库时,我仍然收到以下消息-

    psql: server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
    

    pgpool公司 作品

    我没有在这里添加pgpool和postgresql conf文件,因为我认为它们与此无关,但如果需要,我会添加它们。

    1 回复  |  直到 7 年前
        1
  •  3
  •   Muhammad Usama    7 年前

    如果在节点故障的情况下将后端节点设置为故障转移,则在对其执行故障转移后,Pgpool II会分离故障节点。这就是你的情况。但一旦分离,故障节点就不会自动连接回Pgpool II,即使它们再次可用/可访问。原因是Pgpool II本身无法确保节点故障是否已导致某些数据损坏和/或是否仍按用户的预期正确复制。 pcp_attach_node 命令