Skip site navigation (1) Skip section navigation (2)

Re: Miscalculation in IsCheckpointOnSchedule()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Miscalculation in IsCheckpointOnSchedule()
Date: 2007-11-14 05:32:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)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

In response to


pgsql-patches by date

Next:From: Tom LaneDate: 2007-11-14 05:37:26
Subject: Re: [HACKERS] plperl and regexps with accented characters - incompatible?
Previous:From: ITAGAKI TakahiroDate: 2007-11-14 05:26:12
Subject: Miscalculation in IsCheckpointOnSchedule()

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group