Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: masao.fujii@gmail.com, pgsql-hackers@postgresql.org
Date: 2012-04-17T09:06:05Z
Lists: 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