archive_timeout in postgresql.conf

Поиск
Список
Период
Сортировка
Искать

archive_timeout in postgresql.conf

От:
akp geek <akpgeek@gmail.com>
Дата:
Hi All -
 
                     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?
 
Regards

Re: archive_timeout in postgresql.conf

От:
Greg Smith <greg@2ndquadrant.com>
Дата:
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@2ndQuadrant.com   www.2ndQuadrant.us

FAQ