Hi,

You might have to wait for pg_is_in_recovery to be false after the
promotion. (in 9.6 pg_ctl promote doesn't wait for promotion to complete
unlike 10).  [1]

You should CHECKOINT between 2 and 3. (or wait for the first checkpoint to
finish)
In the thread [2], Michael Paquier explains that:

" This makes the promoted standby update its
timeline number in the on-disk control file, which is used by pg_rewind
to check if a rewind needs to happen or not. "

Benoit,

[1] https://paquier.xyz/postgresql-2/postgres-10-wait-pgctl-promote/
[2]
https://www.postgresql.org/message-id/flat/20180804205026.GJ20967%40paquier.xyz#f89ffda99fb5e7355e7499f496a712f7

Reply via email to