Re: Fix overflow of nbatch

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: Tomas Vondra <tomas(at)vondra(dot)me>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Rowley <dgrowleyml(at)gmail(dot)com>, Vaibhav Jain <jainva(at)google(dot)com>, pgsql-hackers(at)postgresql(dot)org, Madhukar <madhukarprasad(at)google(dot)com>, Sangeetha Seshadri <sangsesh(at)google(dot)com>
Subject: Re: Fix overflow of nbatch
Date: 2025-10-13 16:13:12
Message-ID: CAAKRu_auu0ex7p=2sZKz8XW6XWS5x4_+M289F=Qt1GhnMpV5yw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 13, 2025 at 12:05 PM Melanie Plageman
<melanieplageman(at)gmail(dot)com> wrote:
>
> On Thu, Oct 9, 2025 at 7:36 PM Tomas Vondra <tomas(at)vondra(dot)me> wrote:
> >
> > 1) A couple comments adjusted. It feels a bit too audacious to correct
> > comments written by native speaker, but it seems cleaner to me like this.
>
> I attached a patch with a few more suggested adjustments (0003)

Oh and I didn't add this but, all of the other pointer dereferences
have unnecessary (in terms of operator precedence) parentheses around
them, so, for consistency, I would put them around this (or remove
them everywhere since they are not needed)

if (nbatch < *space_allowed / BLCKSZ)
break;

- Melanie

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2025-10-13 16:21:11 Re: Build failure with Meson >= 1.8.3 on Windows
Previous Message Tom Lane 2025-10-13 16:10:56 Re: add function argument name to substring and substr