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

Commit0fcc2de

Browse files
committed
In clog_redo(), don't set XactCtl->shared->latest_page_number.
The comment is no longer accurate, and hasn't been entirely accuratesince Hot Standby was introduced. The original idea here was thatStartupCLOG() wouldn't be called until the end of recovery andtherefore this value would be uninitialized when this code is reached,but Hot Standby made that true only when hot_standby=off, and commit1f113ab means that this value is nowalways initialized before replay even starts.The original purpose of this code was to bypass the sanity checkin SimpleLruTruncate(), which will no longer occur: now, if somethingis wrong, that sanity check might trip during recovery. That'sprobably a good thing, because in the current code baselatest_page_number should always be initialized and therefore weexpect that the sanity check should pass. If it doesn't, somethinghas gone wrong, and complaining about it is appropriate.Patch by me, reviewed by Heikki Linnakangas.Discussion:http://postgr.es/m/CA+TgmoZYig9+AQodhF5sRXuKkJ=RgFDugLr3XX_dz_F-p=TwTg@mail.gmail.com
1 parent662affc commit0fcc2de

File tree

1 file changed

+0
-6
lines changed
  • src/backend/access/transam

1 file changed

+0
-6
lines changed

‎src/backend/access/transam/clog.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,12 +1011,6 @@ clog_redo(XLogReaderState *record)
10111011

10121012
memcpy(&xlrec,XLogRecGetData(record),sizeof(xl_clog_truncate));
10131013

1014-
/*
1015-
* During XLOG replay, latest_page_number isn't set up yet; insert a
1016-
* suitable value to bypass the sanity test in SimpleLruTruncate.
1017-
*/
1018-
XactCtl->shared->latest_page_number=xlrec.pageno;
1019-
10201014
AdvanceOldestClogXid(xlrec.oldestXact);
10211015

10221016
SimpleLruTruncate(XactCtl,xlrec.pageno);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp