Question regarding failover behavior

From: Koen De Groote <kdg(dot)dev(at)gmail(dot)com>
To: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Question regarding failover behavior
Date: 2022-08-23 23:09:30
Message-ID: CAGbX52H23OoYzoUM+nR+qx0_8vNi3a1H8GA-UtCy666qbuGHQQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bryn Llewellyn 2022-08-24 00:12:20 Re: Surprising results from current_role in a "security invoker" trigger function in a "cascade delete via FK" scenario
Previous Message Stephen Frost 2022-08-23 19:43:11 Re: Setting up a server with previous day data