Re: Standardize type of variable when extending Buffers

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: gurjeet(at)singh(dot)im, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Standardize type of variable when extending Buffers
Date: 2023-07-10 11:08:36
Message-ID: CAEudQAqJMrnmGPMsBVnLkKOJHPuv7JXB5t4xjQXb8WmjZjeSFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em seg., 10 de jul. de 2023 às 03:27, Kyotaro Horiguchi <
horikyota(dot)ntt(at)gmail(dot)com> escreveu:

> At Fri, 7 Jul 2023 11:29:16 -0700, Gurjeet Singh <gurjeet(at)singh(dot)im> wrote
> in
> > On Fri, Jul 7, 2023 at 6:12 AM Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
> wrote:
> > >
> > > Hi,
> > >
> > > This has already been discussed in [1].
> > > But I thought it best to start a new thread.
> > >
> > > The commit 31966b1 introduced the infrastructure to extend
> > > buffers.
> > > But the patch mixed types with int and uint32.
> > > The correct type of the variable counter is uint32.
> > >
> > > Fix by standardizing the int type to uint32.
> > >
> > > patch attached.
> >
> > LGTM.
>
> LGTM, too.
>
Thanks Gurjeet and Kyotaro, for taking a look.

> I don't think it will actually come to play, since I believe we won't
> be expanding a relation by 16TB all at once. Nevertheless, I believe
> keeping things tidy is a good habit to stick to.
>
Yeah, mainly because of copy-and-paste.
Also, compiler has to promote int to uint32, anyway.

regards,
Ranier Vilela

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2023-07-10 11:43:44 Re: PATCH: Using BRIN indexes for sorted output
Previous Message Kumar, Sachin 2023-07-10 11:06:04 RE: Initial Schema Sync for Logical Replication