Skip to content

Commit 4a24c9a

Browse files
Fix bug in processing of checkpoint time for max_standby_delay. Latest
log time was incorrectly set, typically leading to dates in the past, which would cause more cancellations in Hot Standby on a quiet server.
1 parent a724584 commit 4a24c9a

File tree

1 file changed

+2
-2
lines changed
  • src/backend/access/transam

1 file changed

+2
-2
lines changed

src/backend/access/transam/xlog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.411 2010/05/14 07:11:48 sriggs Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.412 2010/05/15 07:14:43 sriggs Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -5450,7 +5450,7 @@ recoveryStopsHere(XLogRecord *record, bool *includeThis)
54505450
CheckPoint checkPoint;
54515451

54525452
memcpy(&checkPoint, XLogRecGetData(record), sizeof(CheckPoint));
5453-
recoveryLastXTime = checkPoint.time;
5453+
recoveryLastXTime = time_t_to_timestamptz(checkPoint.time);
54545454
}
54555455

54565456
/*

0 commit comments

Comments
 (0)