postgresql - pg_rewind:源和目标集群在同一时间线上
问题描述
我尝试source/target
使用pg_rewind
以下命令在集群之间进行同步。
而且我知道 100%source/target
集群中的内容不再相同。
/usr/pgsql-12/bin/pg_rewind --source-server="192.168.100.100 user=postgres password=mypassword" -D /var/lib/pgsql/12/data --progress
但pg_rewind
给出以下消息
pg_rewind: source and target cluster are on the same timeline
pg_rewind: no rewind required
我不明白pg_wal
&base
目录的内容有何不同,source/target
但没有pg_rewind
意识到!
解决方案
pg_rewind
仅在最新的公共检查点之后撤消目标服务器上的数据修改。
在最新的公共检查点之后在源服务器上发生的修改将被忽略 - 当目标服务器成为源服务器的备用服务器时,这些将被恢复。
因此,目标服务器可能在源服务器升级之前就被彻底关闭了。
关于时间线的消息是巧合,不是第二条消息的原因。
推荐阅读
- java - 当我通过共享意图共享图像时,应用程序在 Android Oreo 上崩溃
- android - 哪个最好作为 Android 中的时间戳 [仅使用新的 Java.time]?LocalDateTime 还是 Instant.now()?
- javascript - 将自定义组件作为触发器传递时,语义的弹出窗口不显示
- android - 如何根据 Android 项目构建类型(生产与暂存)配置哨兵环境?
- borland-c++ - TEdit - 如果剪贴板包含特定字符串,则忽略粘贴操作
- javascript - firebase.auth().signInAnonymously() 如何维护会话?
- vba - 如何为带有幻灯片时间和标题的 PowerPoint 视频制作生成 YouTube 索引?
- sql - 如何为已创建的 PostgreSQL 表创建外键?
- tcp - tcp_retransmit_skb 的 kprobe。而不是 tcp_retransmit_skb @tcp_states,我想 kprobe __napi_schedule
- java - 过滤器不响应意图