v1-0001-Fix-overflow-when-counting-the-number-of-buffers-.patch
application/octet-stream
Filename: v1-0001-Fix-overflow-when-counting-the-number-of-buffers-.patch
Type: application/octet-stream
Part: 0
Patch
Format: format-patch
Series: patch v1-0001
Subject: Fix overflow when counting the number of buffers to invalidate
| File | + | − |
|---|---|---|
| src/backend/storage/buffer/bufmgr.c | 2 | 2 |
From c1cb353108fcc2f24521089de26664861e52f9c5 Mon Sep 17 00:00:00 2001 From: Takayuki Tsunakawa <tsunakawa.takay@fujitsu.com> Date: Fri, 12 Mar 2021 14:17:34 +0900 Subject: [PATCH v1] Fix overflow when counting the number of buffers to invalidate --- src/backend/storage/buffer/bufmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 4c1d5ec..5aa7b9e 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -2987,7 +2987,7 @@ DropRelFileNodeBuffers(SMgrRelation smgr_reln, ForkNumber *forkNum, int j; RelFileNodeBackend rnode; BlockNumber nForkBlock[MAX_FORKNUM]; - BlockNumber nBlocksToInvalidate = 0; + uint64 nBlocksToInvalidate = 0; rnode = smgr_reln->smgr_rnode; @@ -3111,7 +3111,7 @@ DropRelFileNodesAllBuffers(SMgrRelation *smgr_reln, int nnodes) int n = 0; SMgrRelation *rels; BlockNumber (*block)[MAX_FORKNUM + 1]; - BlockNumber nBlocksToInvalidate = 0; + uint64 nBlocksToInvalidate = 0; RelFileNode *nodes; bool cached = true; bool use_bsearch; -- 2.10.1