如何将现有的Postgresql 12主服务器更改为从服务器?

问题描述 投票:0回答:1

我已经使用pgpool设置了一个主-从postgresql 12服务器,当master关闭时,slave成为master,那么我需要手动更改原始master master slave。我的想法是:1.在原始主机上执行pg_rewind2.触摸“ standby.singal”文件3.执行pg_ctl start

已完成,但在3失败并出现错误:

2020-04-28 20:33:09.071 CST [248626] FATAL:  highest timeline 2 of the primary is behind recovery timeline 3
cp: cannot stat ‘/data/pgdata/12/archive/00000004.history’: No such file or directory

怎么了?以及将现有的postgresql 12主服务器更改为从服务器的正确程序是什么?

postgresql failover master-slave
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.