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

Commit9f0172b

Browse files
committed
Fix initialization of fake LSN for unlogged relations
9155580 has changed the value of the first fake LSN for unloggedrelations from 1 to FirstNormalUnloggedLSN (aka 1000), GiST requiring anon-zero LSN on some pages to allow an interlocking logic to work, butits value was still initialized to 1 at the beginning of recovery orafter running pg_resetwal. This fixes the initialization for both codepaths.Author: Takayuki TsunakawaReviewed-by: Dilip Kumar, Kyotaro Horiguchi, Michael PaquierDiscussion:https://postgr.es/m/OSBPR01MB2503CE851940C17DE44AE3D9FE6F0@OSBPR01MB2503.jpnprd01.prod.outlook.comBackpatch-through: 12
1 parent63ebe20 commit9f0172b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6683,7 +6683,7 @@ StartupXLOG(void)
66836683
if (ControlFile->state==DB_SHUTDOWNED)
66846684
XLogCtl->unloggedLSN=ControlFile->unloggedLSN;
66856685
else
6686-
XLogCtl->unloggedLSN=1;
6686+
XLogCtl->unloggedLSN=FirstNormalUnloggedLSN;
66876687

66886688
/*
66896689
* We must replay WAL entries using the same TimeLineID they were created

‎src/bin/pg_resetwal/pg_resetwal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ GuessControlValues(void)
706706
ControlFile.state=DB_SHUTDOWNED;
707707
ControlFile.time= (pg_time_t)time(NULL);
708708
ControlFile.checkPoint=ControlFile.checkPointCopy.redo;
709-
ControlFile.unloggedLSN=1;
709+
ControlFile.unloggedLSN=FirstNormalUnloggedLSN;
710710

711711
/* minRecoveryPoint, backupStartPoint and backupEndPoint can be left zero */
712712

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp