Behaviour of take over the synchronous replication

Поиск
Список
Период
Сортировка
От Sawada Masahiko
Тема Behaviour of take over the synchronous replication
Дата
Msg-id CAD21AoDtUwVS++dNR8L8e2-F7PzfY+zxvg2Pp9eDYR=iXFeCJg@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi all,

I understand that setting synchronous_standby_name to '*' means that
all priority of standby server are same.
and the standby server, which connected to the master server at first,
become SYNC standby, another server become
ASYNC standby as potential server.

So, how to set the priority to standby server is different between '*'
and setting all standby names.
For example, if there are two standby servers (AAA and BBB)

(a) synchronous_standby_names = 'AAA,BBB'

application_name | sync_priority | sync_state
--------------------------+-------------------+------------       AAA           |          1         | sync       BBB
       |          2         | potential
 

(b) synchronous_standby_names = '*'

application_name | sync_priority | sync_state
--------------------------+-------------------+------------       AAA           |          1         | sync       BBB
       |          1         | potential
 

If the AAA server is failed, BBB server take over SYNC replication.
After take over, when AAA server starts, AAA server re-take over SYNC
replication from BBB server in both case (a) and case(b).
That is, AAA server starts as SYNC server again.

in case (a), those priority is clear. So I think that re-taking over
is correct behaviour.
OHOT, in case (b), even if AAA and BBB are set same priority, AAA
server steals SYNC replication.
I think it is better that BBB server continue behaviour SYNC standby,
and AAA should become potential server.

What am I missing?
Please give me feedback.

Regards,

-------
Sawada Masahiko



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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: pg_system_identifier()
Следующее
От: Kohei KaiGai
Дата:
Сообщение: Re: Does larger i/o size make sense?