Updating to say I tested and ran into the issue where the timeline switched from 0C to 0D.
Trying to bring the old primary back up as standby fails. It recovers upto a point and then gets stuck asked for a next file that doesn't exist. Regardless of taking the existing data directory or restoring a new basebackup. Taking a new basebackup, with the new primary, and restoring that, works. Standby gets in sync and everything is as expected. Kind regards, Koen De Groote On Wed, Aug 24, 2022 at 1:09 AM Koen De Groote <kdg....@gmail.com> wrote: > Hello all, > > I have a system that was originally set up on 9.3, a few years ago moved > to 11.2 > > A shared mount is used to host the basebackup and wal archives. > > The failover procedure was basically manual and as follow: > > 1/ Take out the primary, remove the IP from the primary machine/VM > 2/ Create the trigger_file on the standby, add the IP to the new primary > machine/VM > 3/ Create a basebackup from the new primary > 4/ Redeploy the new standby, which will unpack this basebackup from step 3 > 5/ The new standby will have a restore_command to get synced back up. > > I see there's more recent tools like pg_rewind these days. Haven't had > time to check that out and probably won't for a while. > > My question is: is the basebackup actually necessary? Can I not simply > modify the configuration old the old primary, set it up like a standby, and > then start the process/container, and have it pick up the necessary > wal_archives with the restore_command? > > Or is it more complicated than that? Something like a timeline jump or > something else that makes it impossible to simply set the old primary to > standby and start it again? > > Kind regards, > Koen De Groote >