Re: Postgres 9 slave lag

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Saurabh Agrawal" <saurabh(dot)miet(at)gmail(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Postgres 9 slave lag
Date: 2011-04-11 21:46:16
Message-ID: 4DA33058020000250003C699@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Saurabh Agrawal <saurabh(dot)miet(at)gmail(dot)com> wrote:

> max_standby_archive_delay = -1
>
> I noticed that whenever long running query executes on slave,
> slave starts lagging by master and as soon as query completes log
> files get applied immediately. Please help how can I avoid slave
> lag.

You can adjust max_standby_archive_delay to the maximum amount of
time you want replication to block waiting for your query. If that
is exceeded, your query will be canceled to allow replication to
continue.

http://www.postgresql.org/docs/9.0/interactive/hot-standby.html#HOT-STANDBY-CONFLICT

-Kevin

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Simon Luijk 2011-04-12 08:28:05 Gap in sequence after fail-over
Previous Message Jerry Sievers 2011-04-11 20:11:52 Re: Out of memory during index creation