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

Commit9847ca2

Browse files
committed
Standardize type of extend_by counter
The counter of extend_by loops is mixed int and uint32. Fix bystandardizing from int to uint32, to match the extend_by variable.Fixup for31966b1.Author: Ranier Vilela <ranier.vf@gmail.com>Reviewed-by: Gurjeet Singh <gurjeet@singh.im>Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/CAEudQAqHG-JP-YnG54ftL_b7v6-57rMKwET_MSvEoen0UHuPig@mail.gmail.com
1 parent78a33bb commit9847ca2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ ExtendBufferedRelTo(BufferManagerRelation bmr,
955955
current_size=first_block+extended_by;
956956
Assert(num_pages!=0||current_size >=extend_to);
957957

958-
for (inti=0;i<extended_by;i++)
958+
for (uint32i=0;i<extended_by;i++)
959959
{
960960
if (first_block+i!=extend_to-1)
961961
ReleaseBuffer(buffers[i]);
@@ -1938,7 +1938,7 @@ ExtendBufferedRelShared(BufferManagerRelation bmr,
19381938
* This needs to happen before we extend the relation, because as soon as
19391939
* we do, other backends can start to read in those pages.
19401940
*/
1941-
for (inti=0;i<extend_by;i++)
1941+
for (uint32i=0;i<extend_by;i++)
19421942
{
19431943
Buffervictim_buf=buffers[i];
19441944
BufferDesc*victim_buf_hdr=GetBufferDescriptor(victim_buf-1);
@@ -2070,7 +2070,7 @@ ExtendBufferedRelShared(BufferManagerRelation bmr,
20702070
io_start,extend_by);
20712071

20722072
/* Set BM_VALID, terminate IO, and wake up any waiters */
2073-
for (inti=0;i<extend_by;i++)
2073+
for (uint32i=0;i<extend_by;i++)
20742074
{
20752075
Bufferbuf=buffers[i];
20762076
BufferDesc*buf_hdr=GetBufferDescriptor(buf-1);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ ExtendBufferedRelLocal(BufferManagerRelation bmr,
360360
relpath(bmr.smgr->smgr_rlocator,fork),
361361
MaxBlockNumber)));
362362

363-
for (inti=0;i<extend_by;i++)
363+
for (uint32i=0;i<extend_by;i++)
364364
{
365365
intvictim_buf_id;
366366
BufferDesc*victim_buf_hdr;
@@ -416,7 +416,7 @@ ExtendBufferedRelLocal(BufferManagerRelation bmr,
416416
pgstat_count_io_op_time(IOOBJECT_TEMP_RELATION,IOCONTEXT_NORMAL,IOOP_EXTEND,
417417
io_start,extend_by);
418418

419-
for (inti=0;i<extend_by;i++)
419+
for (uint32i=0;i<extend_by;i++)
420420
{
421421
Bufferbuf=buffers[i];
422422
BufferDesc*buf_hdr;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp