Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8463880

Browse files
Fix LagTrackerRead() for timeline increments
Bug was masked by error in running 004_timeline_switch.pl that wasfixed recently in7d68f22.Detective work by Alvaro Herrera and Tom LaneAuthor: Thomas Munro
1 parent0874d4f commit8463880

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

‎src/backend/replication/walsender.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3328,7 +3328,16 @@ LagTrackerRead(int head, XLogRecPtr lsn, TimestampTz now)
33283328
WalTimeSampleprev=LagTracker.last_read[head];
33293329
WalTimeSamplenext=LagTracker.buffer[LagTracker.read_heads[head]];
33303330

3331-
Assert(lsn >=prev.lsn);
3331+
if (lsn<prev.lsn)
3332+
{
3333+
/*
3334+
* Reported LSNs shouldn't normally go backwards, but it's
3335+
* possible when there is a timeline change. Treat as not
3336+
* found.
3337+
*/
3338+
return-1;
3339+
}
3340+
33323341
Assert(prev.lsn<next.lsn);
33333342

33343343
if (prev.time>next.time)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp