Re: Cascading replication: should we detect/prevent cycles?

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cascading replication: should we detect/prevent cycles?
Date: 2012-12-19 08:34:15
Message-ID: CA+U5nM+Pwonwy8CcPFi6WyKK04LP5a82Z6oKWhn6=ELwovKrUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 19 December 2012 08:11, Joshua D. Drake <jd(at)commandprompt(dot)com> wrote:
>
> On 12/18/2012 11:57 PM, Simon Riggs wrote:
>>
>>
>> On 19 December 2012 03:03, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
>>
>>> So, my question is:
>>>
>>> 1. should we detect for replication cycles? *Can* we?
>>> 2. should we warn the user, or refuse to start up?
>>
>>
>> Why not just monitor the config you just created? Anybody that
>> actually tests their config would spot this.
>
>
> I think you are being optimistic. We should probably have some logic that
> prevents circular replication.

My logic is that if you make a 1 minute test you will notice your
mistake, which is glaringly obvious. That is sufficient to prevent
that mistake, IMHO.

If you don't test your config and don't monitor either, good luck with HA.

Patches welcome, if you think this important enough.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Groshev Andrey 2012-12-19 09:51:08 Re: [GENERAL] trouble with pg_upgrade 9.0 -> 9.1
Previous Message Joshua D. Drake 2012-12-19 08:11:55 Re: Cascading replication: should we detect/prevent cycles?