Question regarding failover behavior

Поиск
Список
Период
Сортировка
От Koen De Groote
Тема Question regarding failover behavior
Дата
Msg-id CAGbX52H23OoYzoUM+nR+qx0_8vNi3a1H8GA-UtCy666qbuGHQQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Question regarding failover behavior  (Koen De Groote <kdg.dev@gmail.com>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Setting up a server with previous day data
Следующее
От: Bryn Llewellyn
Дата:
Сообщение: Re: Surprising results from current_role in a "security invoker" trigger function in a "cascade delete via FK" scenario