我有两个码头集装箱在两个不同的码头主机上运行。
码头host1: 192.168.10.3
码头host2: 192.168.10.4
容器1运行在host1上,容器2运行在host2上。两个节点上都发布了端口5432。wal_log_hints在运行PostgreSQL的两个容器上都是on。
现在,当我第一次尝试pg_rewind时,来自container2:
su - postgres -c "/usr/pgsql-14/bin/pg_rewind -D /var/lib/pgsql/14/data --source-server=\"port=5432 user=cysql dbname=test host=container1.myorg.com\" --dry-run"如果出现以下错误,它将失败:
pg_rewind: source and target cluster are on the same timeline
pg_rewind: no rewind required如果在普通计算机RockyLinux 8.6上运行相同的操作,则pg_rewind的错误如下:
pg_rewind: fatal: source and target clusters are from different systems我知道当您再次同步回集群时,pg_rewind应该使用,但是我的情况不同,我想首先检查pg_rewind是否可以进行不同的同步,如果是,那么去做,否则使用pg_basebackup。不清楚为什么pg_rewind在容器和普通机器的情况下表现不同。有什么帮助吗?
发布于 2023-03-02 07:25:31
此错误意味着第二个数据库不是从第一个数据库的文件系统级备份创建的。您只能在两个以相互克隆的方式开始的集群上使用pg_rewind,而不能在通过单独的initdb调用创建的集群上使用。
https://dba.stackexchange.com/questions/324263
复制相似问题