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

Commit519e4c9

Browse files
author
Amit Kapila
committed
Fix size overflow in calculation introduced by commitsd6ad34f andbea449c.
Reported-by: Thomas MunroAuthor: Takayuki TsunakawaReviewed-by: Kyotaro HoriguchiDiscussion:https://postgr.es/m/CA+hUKG+oPoFizjABt=GXZWTEHx3oev5rAe2scjW2r6F1rguo5w@mail.gmail.com
1 parente2cda3c commit519e4c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/storage/buffer/bufmgr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
* being dropped. For the relations with size below this threshold, we find
7777
* the buffers by doing lookups in BufMapping table.
7878
*/
79-
#defineBUF_DROP_FULL_SCAN_THRESHOLD(uint32) (NBuffers / 32)
79+
#defineBUF_DROP_FULL_SCAN_THRESHOLD(uint64) (NBuffers / 32)
8080

8181
typedefstructPrivateRefCountEntry
8282
{
@@ -2987,7 +2987,7 @@ DropRelFileNodeBuffers(SMgrRelation smgr_reln, ForkNumber *forkNum,
29872987
intj;
29882988
RelFileNodeBackendrnode;
29892989
BlockNumbernForkBlock[MAX_FORKNUM];
2990-
BlockNumbernBlocksToInvalidate=0;
2990+
uint64nBlocksToInvalidate=0;
29912991

29922992
rnode=smgr_reln->smgr_rnode;
29932993

@@ -3111,7 +3111,7 @@ DropRelFileNodesAllBuffers(SMgrRelation *smgr_reln, int nnodes)
31113111
intn=0;
31123112
SMgrRelation*rels;
31133113
BlockNumber (*block)[MAX_FORKNUM+1];
3114-
BlockNumbernBlocksToInvalidate=0;
3114+
uint64nBlocksToInvalidate=0;
31153115
RelFileNode*nodes;
31163116
boolcached= true;
31173117
booluse_bsearch;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp