Cascading replication: should we detect/prevent cycles?

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

So as a test I tried to connect a group of 9.3 streaming replicas in a
circle (4 replicas).  This was very easy to do:

1. create r1 as replica of master
2. create r2 as replica of r1
3. create r3 as replica of r2
4. create r4 as replica of r3
5. start traffic on master
6. shut down r1
7. point r1 to r4 in recovery.conf
8. start r1

replicas are now successfully connected in this pattern:

r1 ---> r2^       ||       ||       v
r4 <--- r3

pg_stat_replication displays the correct information on each replica.

So, my question is:

1. should we detect for replication cycles?  *Can* we?
2. should we warn the user, or refuse to start up?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Switching timeline over streaming replication
Следующее
От: Josh Berkus
Дата:
Сообщение: Feature Request: pg_replication_master()