Re: Miscalculation in IsCheckpointOnSchedule() - Mailing list pgsql-patches

From Tom Lane
Subject Re: Miscalculation in IsCheckpointOnSchedule()
Date
Msg-id 14221.1195018334@sss.pgh.pa.us
Whole thread Raw
In response to Miscalculation in IsCheckpointOnSchedule()  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: Miscalculation in IsCheckpointOnSchedule()
Re: Miscalculation in IsCheckpointOnSchedule()
List pgsql-patches
ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> 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 happens near a segment
boundary crossing?

            regards, tom lane

pgsql-patches by date:

Previous
From: ITAGAKI Takahiro
Date:
Subject: Miscalculation in IsCheckpointOnSchedule()
Next
From: ITAGAKI Takahiro
Date:
Subject: Re: Miscalculation in IsCheckpointOnSchedule()