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

Commit5b2b444

Browse files
committed
Adjust OLDSERXID_MAX_PAGE based on BLCKSZ.
The value when BLCKSZ = 8192 is unchanged, but with larger-than-normalblock sizes we might need to crank things back a bit, as we'll havemore entries per page than normal in that case.Kevin Grittner
1 parenta195e3c commit5b2b444

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎src/backend/storage/lmgr/predicate.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,13 @@ static SlruCtlData OldSerXidSlruCtlData;
305305
#defineOLDSERXID_PAGESIZEBLCKSZ
306306
#defineOLDSERXID_ENTRYSIZEsizeof(SerCommitSeqNo)
307307
#defineOLDSERXID_ENTRIESPERPAGE(OLDSERXID_PAGESIZE / OLDSERXID_ENTRYSIZE)
308-
#defineOLDSERXID_MAX_PAGE(SLRU_PAGES_PER_SEGMENT * 0x10000 - 1)
308+
309+
/*
310+
* Set maximum pages based on the lesser of the number needed to track all
311+
* transactions and the maximum that SLRU supports.
312+
*/
313+
#defineOLDSERXID_MAX_PAGEMin(SLRU_PAGES_PER_SEGMENT * 0x10000 - 1, \
314+
(MaxTransactionId + 1) / OLDSERXID_ENTRIESPERPAGE - 1)
309315

310316
#defineOldSerXidNextPage(page) (((page) >= OLDSERXID_MAX_PAGE) ? 0 : (page) + 1)
311317

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp