Re: Replication delay

From: "ascot(dot)moss(at)gmail(dot)com" <ascot(dot)moss(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: "ascot(dot)moss(at)gmail(dot)com" <ascot(dot)moss(at)gmail(dot)com>, PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Replication delay
Date: 2013-08-12 11:17:49
Message-ID: 84289399-B62B-4728-8A9B-14A099A6D6D4@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Thanks so much.

On 11 Aug 2013, at 9:50 PM, Michael Paquier wrote:

> On Sun, Aug 11, 2013 at 5:51 AM, ascot(dot)moss(at)gmail(dot)com
> <ascot(dot)moss(at)gmail(dot)com> wrote:
>> Hi,
>>
>> I have a pair of PG servers, a master and a replica, all read-write queries are handled by the master, read-only ones are by the replica.
>>
>> From time to time the replica itself is too busy, all read-only queries will get inconsistent results because of replication lag, sometimes it can be longer than 6 minutes. I am thinking to add multiple replicas to off-load read-only queries, can you please suggest a way to monitor and failover the read-only query when the replication lag in a replica is more than 5 minutes?
> I assume that you could use pgpool for that. It has some monitoring
> features for replication delay and it can do read-only load balancing
> among several servers. You also shouldn't need to change your
> application.
> Have a look at its documentation to make an opinion:
> http://pgpool.projects.pgfoundry.org/pgpool-II/doc/pgpool-en.html
>
> Regards,
> --
> Michael

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jayadevan M 2013-08-12 11:57:22 Re: Trigger to update table info
Previous Message ascot.moss@gmail.com 2013-08-12 10:34:23 Recovery.conf PITR by recovery_target_time

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2013-08-12 13:26:51 Re: libpq thread locking during SSL connection start
Previous Message Pavel Raiskup 2013-08-12 10:37:29 [PATCH] Re: [BUGS] BUG #7815: Upgrading PostgreSQL from 9.1 to 9.2 with pg_upgrade/postgreql-setup fails - invalid status retrieve