Re: archive_timeout in postgresql.conf

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: akp geek <akpgeek(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: archive_timeout in postgresql.conf
Date: 2010-02-25 02:54:42
Message-ID: 4B85E672.3080302@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

akp geek wrote:
>
> I am trying to set up the PG_STANDBY on our
> database setup. our requirement is, In case of disaster we should be
> able to bring up standby, the lag time allowed in our setup is up to 2
> hours.
> The question I have is, what should be the value
> I set for the archive_timeout in the postgressql.conf file? Can you
> please help?

You might as well set it to something similar in scale to
checkpoint_timeout; 5 or 10 minutes would be completely reasonable for
archive_timeout.

That parameter isn't the only component to lag time though, it primarily
impacts how many transactions you're willing to lose if commits happen
on the master that aren't transferred over to the standby and the master
dies. Lag time is that time, plus however long it takes the standby to
keep up with processing the incoming archive files, plus how long it
takes to bring it out of recovery after a primary failure.

--
Greg Smith 2ndQuadrant US Baltimore, MD
PostgreSQL Training, Services and Support
greg(at)2ndQuadrant(dot)com www.2ndQuadrant.us

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Terry 2010-02-25 03:50:19 select issue with order v8.1
Previous Message Greg Smith 2010-02-25 02:47:00 Re: Missing clog, PITR