Re: [GENERAL] PG synchronous replication and unresponsive slave

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: manoj(at)nimblestorage(dot)com
Cc: masao(dot)fujii(at)gmail(dot)com, pgsql-general(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Re: [GENERAL] PG synchronous replication and unresponsive slave
Date: 2012-01-18 02:12:50
Message-ID: 20120118.111250.47853989295806015.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

> 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).

I'm not sure I fully understand your requirement but...

From pgpool-II 3.1, it has a switch not to trigger failover and you
can use it for avoiding automatic failover of master node. For
detecting replication not working case, you can use replication delay
feature of pgpool-II. It monitors replication delay between master and
standby: if the delay is greater than a threshold, it stopps to send
read query to the standby. In case of standby failure (server down
etc.) you can use automatic failover as usual.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

> thanks,
> Manoj
>
>
> On 01/17/2012 05:04 PM, Fujii Masao wrote:
>> On Wed, Jan 18, 2012 at 6:37 AM, Manoj Govindassamy
>> <manoj(at)nimblestorage(dot)com> wrote:
>>> (2) We are not comfortable moving to PGPool just for automatic
>>> failback mode
>>> on hot-standby failure.
>> Hmm.. my reply might be misleading. What I meant was to use pgpool-II
>> as a clusterware for PostgreSQL built-in replication, not as a
>> replication
>> itself. You can health-check, do failover if necessary and manage the
>> PostgreSQL replication by using pgpool-II. AFAIK pgpool-II has such an
>> operation mode. But you are still not comfortable in using pgpool-II
>> in
>> that way?
>>
>> Regards,
>>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Sergey Konoplev 2012-01-18 08:38:16 Re: Interpreting pg_stat_replication values
Previous Message Fujii Masao 2012-01-18 02:12:26 Re: PG synchronous replication and unresponsive slave

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2012-01-18 03:39:25 Re: Whats the most efficient query for this result?
Previous Message Fujii Masao 2012-01-18 02:12:26 Re: PG synchronous replication and unresponsive slave