Обсуждение: Swapping master and slave

Поиск
Список
Период
Сортировка

Swapping master and slave

От
Yambu
Дата:
Hello

If i want to swap master and slave servers, do i have to run the pg_basebackup on the new slave ?

regards

Re: Swapping master and slave

От
Nikhil Shetty
Дата:
Hi Yambu,

If you have a failover tool like EDB EFM,repmgr or others then it will automatically take care of promoting the standby to master and reconfiguring old master as new slave when you do a switchover.

If you don't have such tools then you can manually promote the standy to be the new master and run a pg_rewind on the old master to sync with the new master. If pg_rewind does not work then you will have to rebuild the old master using pg_basebackup.

Thanks and Regards,
Nikhil

On Fri, Nov 27, 2020 at 7:48 AM Yambu <hyambu@gmail.com> wrote:
Hello

If i want to swap master and slave servers, do i have to run the pg_basebackup on the new slave ?

regards