Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 840b3b5

Browse files
committed
Fix private struct field name to match the code using it.
Commit 8720a15 added the wrong name. Nazir Bilal Yavuz Discussion: https://postgr.es/m/[email protected]
1 parent 3937cad commit 840b3b5

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
@@ -143,7 +143,7 @@ typedef struct SMgrSortArray
143143
struct copy_storage_using_buffer_read_stream_private
144144
{
145145
BlockNumber blocknum;
146-
BlockNumber last_block;
146+
BlockNumber nblocks;
147147
};
148148

149149
/*
@@ -157,7 +157,7 @@ copy_storage_using_buffer_read_stream_next_block(ReadStream *stream,
157157
{
158158
struct copy_storage_using_buffer_read_stream_private *p = callback_private_data;
159159

160-
if (p->blocknum < p->last_block)
160+
if (p->blocknum < p->nblocks)
161161
return p->blocknum++;
162162

163163
return InvalidBlockNumber;
@@ -4746,7 +4746,7 @@ RelationCopyStorageUsingBuffer(RelFileLocator srclocator,
47464746

47474747
/* Initalize streaming read */
47484748
p.blocknum = 0;
4749-
p.last_block = nblocks;
4749+
p.nblocks = nblocks;
47504750
src_smgr = smgropen(srclocator, INVALID_PROC_NUMBER);
47514751
src_stream = read_stream_begin_smgr_relation(READ_STREAM_FULL,
47524752
bstrategy_src,

0 commit comments

Comments
 (0)