Skip to content

Commit 5858990

Browse files
committed
Fix incorrect calculation of elapsed_xlogs. Itagaki Takahiro
1 parent ca450a0 commit 5858990

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/postmaster/bgwriter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/bgwriter.c,v 1.45 2007/10/04 15:37:44 tgl Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/bgwriter.c,v 1.46 2007/11/14 21:19:18 tgl Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -718,7 +718,7 @@ IsCheckpointOnSchedule(double progress)
718718
recptr = GetInsertRecPtr();
719719
elapsed_xlogs =
720720
(((double) (int32) (recptr.xlogid - ckpt_start_recptr.xlogid)) * XLogSegsPerFile +
721-
((double) (int32) (recptr.xrecoff - ckpt_start_recptr.xrecoff)) / XLogSegSize) /
721+
((double) recptr.xrecoff - (double) ckpt_start_recptr.xrecoff) / XLogSegSize) /
722722
CheckPointSegments;
723723

724724
if (progress < elapsed_xlogs)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy