On Mon, Apr 16, 2012 at 9:05 PM, Kyotaro HORIGUCHI <horiguchi.kyot...@lab.ntt.co.jp> wrote: > In the backported version to 9.1.3, bgwriter.c is modified > instead of checkpointer.c in 9.2. And GetWalRcvWriteRecPtr() is > used as the equivalent of GetStandbyFlushRecPtr() in 9.2.
In 9,2, GetXLogReplayRecPtr() should be used instead of GetStandbyFlushRecPtr(). A restartpoint is scheduled to finish before next restartpoint is triggered. A restartpoint is triggered if too much WAL files have been replayed since last restartpoint. So a restartpoint should be scheduled according to the replay location not the receive location. - * computed before calling CreateCheckPoint. The code in XLogInsert that - * actually triggers a checkpoint when checkpoint_segments is exceeded - * compares against RedoRecptr, so this is not completely accurate. - * However, it's good enough for our purposes, we're only calculating an - * estimate anyway. + * computed before calling CreateCheckPoint. The code in + * XLogInsert that actually triggers a checkpoint when + * checkpoint_segments is exceeded compares against RedoRecptr. + * Similarly, we consult WAL flush location instead on hot + * standbys and XLogPageRead compares it aganst RedoRecptr, too. + * Altough these are not completely accurate, it's good enough for + * our purposes, we're only calculating an estimate anyway. I think that basically it's better not to change the comments (i.e., not to add the line feed) if their contents are the same as previous ones, to highlight what you actually changed in the patch. Typo: RedoRecptr should be RedoRecPtr? Regards, -- Fujii Masao -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers