Re: Standby server lagging behind

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Huda Booley (huda(at)careerjunction(dot)co(dot)za)" <Huda(at)careerjunction(dot)co(dot)za>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Cc: "simon(at)2ndQuadrant(dot)com" <simon(at)2ndQuadrant(dot)com>
Subject: Re: Standby server lagging behind
Date: 2010-01-22 14:37:44
Message-ID: 4B5963D8020000250002EA26@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Huda Booley (huda(at)careerjunction(dot)co(dot)za)"
<Huda(at)careerjunction(dot)co(dot)za> wrote:

> These get copied to the standby so its all there, just not being
> applied fast enough.

If the files are there and are not applying fast enough, it's
probably because on the source machine you can have multiple
connections submitting data modifications, keeping multiple CPUs and
spindles busy all at the same time. When playing back the WAL files
on the warm standby, you have one connection which has a harder time
keeping a lot of resources busy.

I think I have some recall of improvements to that in the 8.4
release, so an upgrade might help. Other than that, I think it's
mostly a matter of your hardware and OS. Make sure you have a RAID
controller with battery backed cache configured for write-back,
spread the database across as many spindles as you can, don't worry
so much about how *many* CPUs you have as how *fast* they are.

I've never actually had this problem, so take my advice on it with
a grain of salt.

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-01-22 14:38:06 Re: warn in plperl logs as... NOTICE??
Previous Message Robert Haas 2010-01-22 14:36:39 Re: primary key error message