Re: List of Bitmapset (was Re: ExecRTCheckPerms() and many prunable partitions)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: Richard Guo <guofenglinux(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, David Rowley <dgrowleyml(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: List of Bitmapset (was Re: ExecRTCheckPerms() and many prunable partitions)
Date: 2022-11-15 18:25:16
Message-ID: 1175541.1668536716@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amit Langote <amitlangote09(at)gmail(dot)com> writes:
> On Mon, Nov 14, 2022 at 11:57 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> + * The new member is identified by the zero-based index of the List
>> + * element it should go into, and the bit number to be set therein.

> The comment sounds a bit ambiguous, especially the ", and the bit
> number to be set therein." part. If you meant to describe the
> arguments, how about mentioning their names too, as in:

Done that way in the patch I just posted.

>> + /* forboth will stop at the end of the shorter list, which is fine */

> Isn't this comment unnecessary given that the while loop makes both
> lists be the same length?

No, the while loop ensures that a is at least as long as b.
It could have started out longer, though.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2022-11-15 18:26:05 Re: Reducing the WAL overhead of freezing in VACUUM by deduplicating per-tuple freeze plans
Previous Message Peter Geoghegan 2022-11-15 18:24:05 Standardizing how pg_waldump presents recovery conflict XID cutoffs