From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Saurabh Agrawal <saurabh.miet@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: Postgres 9 slave lag
Date: Mon, 11 Apr 2011 16:46:16 -0500
Message-ID: <4DA33058020000250003C699@gw.wicourts.gov> (raw)
In-Reply-To: <BANLkTi=zxUiKAzcB2JLf=fhkog6tLbfTAw@mail.gmail.com>
References: <BANLkTi=zxUiKAzcB2JLf=fhkog6tLbfTAw@mail.gmail.com>
Saurabh Agrawal <saurabh.miet@gmail.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, saurabh.miet@gmail.com
Subject: Re: Postgres 9 slave lag
In-Reply-To: <4DA33058020000250003C699@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox