Standardize type of extend_by counter
The counter of extend_by loops is mixed int and uint32. Fix by standardizing from int to uint32, to match the extend_by variable. Fixup for 31966b151e. 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
This commit is contained in:
parent
78a33bba4c
commit
9847ca2c79
@ -955,7 +955,7 @@ ExtendBufferedRelTo(BufferManagerRelation bmr,
|
||||
current_size = first_block + extended_by;
|
||||
Assert(num_pages != 0 || current_size >= extend_to);
|
||||
|
||||
for (int i = 0; i < extended_by; i++)
|
||||
for (uint32 i = 0; i < extended_by; i++)
|
||||
{
|
||||
if (first_block + i != extend_to - 1)
|
||||
ReleaseBuffer(buffers[i]);
|
||||
@ -1938,7 +1938,7 @@ ExtendBufferedRelShared(BufferManagerRelation bmr,
|
||||
* This needs to happen before we extend the relation, because as soon as
|
||||
* we do, other backends can start to read in those pages.
|
||||
*/
|
||||
for (int i = 0; i < extend_by; i++)
|
||||
for (uint32 i = 0; i < extend_by; i++)
|
||||
{
|
||||
Buffer victim_buf = buffers[i];
|
||||
BufferDesc *victim_buf_hdr = GetBufferDescriptor(victim_buf - 1);
|
||||
@ -2070,7 +2070,7 @@ ExtendBufferedRelShared(BufferManagerRelation bmr,
|
||||
io_start, extend_by);
|
||||
|
||||
/* Set BM_VALID, terminate IO, and wake up any waiters */
|
||||
for (int i = 0; i < extend_by; i++)
|
||||
for (uint32 i = 0; i < extend_by; i++)
|
||||
{
|
||||
Buffer buf = buffers[i];
|
||||
BufferDesc *buf_hdr = GetBufferDescriptor(buf - 1);
|
||||
|
@ -360,7 +360,7 @@ ExtendBufferedRelLocal(BufferManagerRelation bmr,
|
||||
relpath(bmr.smgr->smgr_rlocator, fork),
|
||||
MaxBlockNumber)));
|
||||
|
||||
for (int i = 0; i < extend_by; i++)
|
||||
for (uint32 i = 0; i < extend_by; i++)
|
||||
{
|
||||
int victim_buf_id;
|
||||
BufferDesc *victim_buf_hdr;
|
||||
@ -416,7 +416,7 @@ ExtendBufferedRelLocal(BufferManagerRelation bmr,
|
||||
pgstat_count_io_op_time(IOOBJECT_TEMP_RELATION, IOCONTEXT_NORMAL, IOOP_EXTEND,
|
||||
io_start, extend_by);
|
||||
|
||||
for (int i = 0; i < extend_by; i++)
|
||||
for (uint32 i = 0; i < extend_by; i++)
|
||||
{
|
||||
Buffer buf = buffers[i];
|
||||
BufferDesc *buf_hdr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user