zoukankan      html  css  js  c++  java
  • pg_rewind 源端时间线发生改变 同步失败

    master-standby情况下,发生如下行为:

    1.master停掉后,standby做为新的master(可能存在部分事物没有同步到standby中)。

    2.新master运行过程中出错,进行恢复,时间线发生变化。

    3.旧master启动前,先跟新master进行pg_rewind,会出现时间线不一致的问题。

    -bash-4.1$ pg_rewind --target-pgdata='xxx' --source-server='host=xx.xx.xx.xx port=xxxx dbname=xx user=xx password=xxxx' -P

    connected to server

    could not find common ancestor of the source and target cluster's timelines
    Failure, exiting

    参考这个也不行:

    “修改新的主库history文件, 把最后一行放上来即可.“

    http://www.ithao123.cn/content-134160.html

    pg_rewind:standby节点promote后, 主节点和备节点都发生了变更的情况, 当然发生变更产生的wal必须存在. 如果old primary发生的变更已经在归档目录, 需要先手工将这些变更拷贝到pg_xlog目录. 备节点发生的变更无所谓, 因为可以通过recovery.conf来解决.

  • 相关阅读:
    ACwing 199 约数之和
    Acwing 222 青蛙的约会
    Acwing 220 最大公约数
    Acwing 200 Hankson的趣味题
    牛客 同余方程
    Acwing 198 反素数
    2020牛客多校 第六场B
    牛客 计数器
    Java基础-快捷键以及DOS命令
    A1111 Online Map (30分)(最短路径、Dijkstra+DFS)
  • 原文地址:https://www.cnblogs.com/kuang17/p/6973092.html
Copyright © 2011-2022 走看看