Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments
Date
Msg-id 4F8D327D.3010107@enterprisedb.com
Whole thread Raw
In response to Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
On 17.04.2012 09:50, Kyotaro HORIGUCHI wrote:
> This is new version of the patch.
> I replaced GetStandbyFlushRecPtr with GetXLogReplayRecPtr to
> check progress of checkpoint following Fujii's sugestion.

The reason we haven't historically obeyed checkpoint_segments during 
recovery is that it slows down the recovery unnecessarily if you're 
restoring from a backup and you replay, say, one week's worth of WAL 
files. If for example you have checkpoint_segments=10 and 
checkpoint_timeout='15 mins' in the server that generated the WAL, you 
would be constantly performing a restartpoint if you trigger one every 
10 segments.

You could argue that you should obey checkpoint_segments in a standby 
server that's caught up with the master, but AFAICS the patch doesn't 
try to detect that.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Why can't I use pgxs to build a plpgsql plugin?
Next
From: Pavel Stehule
Date:
Subject: Re: Clobbered parameter names via DECLARE in PL/PgSQL