Re: PG synchronous replication and unresponsive slave

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Manoj Govindassamy <manoj(at)nimblestorage(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Re: PG synchronous replication and unresponsive slave
Date: 2012-01-18 02:12:26
Message-ID: CAHGQGwEDW-7Djcid1x7A5XXHNYKOA13Mqh0mTBjA=J6sHt86Gg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Wed, Jan 18, 2012 at 10:54 AM, Manoj Govindassamy
<manoj(at)nimblestorage(dot)com> wrote:
> I am aware of pgpool-II and its features. Just that my requirements are
> little different.  I have a System (PG runs on it) which already has
> Failover mechanism to another System and I want PG to be part of this
> cluster and not clustered on its own. Mean, PG has to be running in Master
> system and in synchronous replication mode with another slave system, but
> the failover is driven from the higher level and not just on PG's failure.
>
> So, whenever PG's slave node is unresponsive, we better let the replication
> cutoff and run the master system independently. So, we need better mechanism
> to detect when Master PG's synchronous replication not working as expected
> or when the slave PG is going unresponsive.  If not, master PG is held back
> by the slave PG and so the whole clustered system is stuck. Hope, I am
> making some sense here. Let me know if there are easy ways to detect Master
> PG's replication not working (via libpq would be more preferable).

You can detect that by checking whether information about synchronous
standby is still in pg_stat_replication or not. But I have no good idea about
the way to automatically run some action like reload of the configuration file
on the failure detection. Maybe you need to implement that on your own...

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tatsuo Ishii 2012-01-18 02:12:50 Re: [GENERAL] PG synchronous replication and unresponsive slave
Previous Message Manoj Govindassamy 2012-01-18 01:54:04 Re: PG synchronous replication and unresponsive slave

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2012-01-18 02:12:50 Re: [GENERAL] PG synchronous replication and unresponsive slave
Previous Message Tom Molesworth 2012-01-18 02:08:57 Re: Whats the most efficient query for this result?