Re: Broken replication in 3 node setup, master halt, standby 1promoted, standby 2 - replication not working

Поиск
Список
Период
Сортировка
От David Steele
Тема Re: Broken replication in 3 node setup, master halt, standby 1promoted, standby 2 - replication not working
Дата
Msg-id 851d5773-9911-c2f7-51ba-3dfe0a5108a5@pgmasters.net
обсуждение исходный текст
Ответ на Broken replication in 3 node setup, master halt, standby 1 promoted,standby 2 - replication not working  (Pritam Barhate <pritambarhate@gmail.com>)
Список pgsql-admin
Hi Pritam,

On 1/10/18 2:06 PM, Pritam Barhate wrote:

<...>

> 
> It reports both the standbys working correctly. 
> 
> Halt pg1. 
> 
> On pg2:
> 
> sudo -u postgres pg_ctlcluster 9.6 main promote
> 
> On pg3:
> 
> sudo service postgresql stop
> 
> sudo -u postgres vim /var/lib/postgresql/9.6/main/recovery.conf
> 
> modify it's contents are as follows:
> 
> ```
> primary_conninfo = 'host=pg2 port=5432 user=replicator'
> standby_mode = 'on'
> restore_command = '/usr/bin/pgbackrest --stanza=main archive-get %f "%p"'
> ```

This all looks fine.

I'm not sure why (without testing the configuration), but the switch to
timeline 2 switch is not happening.

Try setting:

recovery_target_timeline=latest

in recovery.conf on pg3.

It's possible that pg3 played past the time when timeline 2 diverged on
pg2 (i.e. pg3 was more up to date), in which case you will need to
restore pg3 from a backup and set the recovery_target_timeline as above.

-- 
-David
david@pgmasters.net


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

Предыдущее
От: Azimuddin Mohammed
Дата:
Сообщение: Replication mode
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Replication mode