Re: [PATCHES] Miscalculation in IsCheckpointOnSchedule()

2007-11-14 Thread Heikki Linnakangas
Tom Lane wrote: ITAGAKI Takahiro [EMAIL PROTECTED] writes: -((double) (int32) (recptr.xrecoff - ckpt_start_recptr.xrecoff)) / XLogSegSize) / +((double) recptr.xrecoff - (double) ckpt_start_recptr.xrecoff) / XLogSegSize) / Surely this makes matters worse, not

Re: [PATCHES] Miscalculation in IsCheckpointOnSchedule()

2007-11-14 Thread Heikki Linnakangas
Heikki Linnakangas wrote: Tom Lane wrote: ITAGAKI Takahiro [EMAIL PROTECTED] writes: - ((double) (int32) (recptr.xrecoff - ckpt_start_recptr.xrecoff)) / XLogSegSize) / + ((double) recptr.xrecoff - (double) ckpt_start_recptr.xrecoff) / XLogSegSize) / Surely this makes matters

Re: [PATCHES] Miscalculation in IsCheckpointOnSchedule()

2007-11-14 Thread Tom Lane
ITAGAKI Takahiro [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] wrote: Surely this makes matters worse, not better. What happens near a segment boundary crossing? Here is the dumped progres information by the attached patch (only for debug purpose). Oh, I take that back. I was

[PATCHES] Miscalculation in IsCheckpointOnSchedule()

2007-11-13 Thread ITAGAKI Takahiro
I run long DBT-2 with 8.3beta2 and saw checkpoint spikes periodically. The progress against WAL segments consumption *jumped up* in such cases. It seems to be a miscalculation in IsCheckpointOnSchedule(). xrecoff is uint32, therefore the difference of two xrecoffs could be between -4G and +4G. We

Re: [PATCHES] Miscalculation in IsCheckpointOnSchedule()

2007-11-13 Thread Tom Lane
ITAGAKI Takahiro [EMAIL PROTECTED] writes: - ((double) (int32) (recptr.xrecoff - ckpt_start_recptr.xrecoff)) / XLogSegSize) / + ((double) recptr.xrecoff - (double) ckpt_start_recptr.xrecoff) / XLogSegSize) / Surely this makes matters worse, not better. What

Re: [PATCHES] Miscalculation in IsCheckpointOnSchedule()

2007-11-13 Thread ITAGAKI Takahiro
Tom Lane [EMAIL PROTECTED] wrote: ITAGAKI Takahiro [EMAIL PROTECTED] writes: -((double) (int32) (recptr.xrecoff - ckpt_start_recptr.xrecoff)) / XLogSegSize) / +((double) recptr.xrecoff - (double) ckpt_start_recptr.xrecoff) / XLogSegSize) / Surely this makes