Re: Batch TIDs lookup in ambulkdelete

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: John Naylor <johncnaylorls(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Batch TIDs lookup in ambulkdelete
Date: 2025-06-09 19:29:31
Message-ID: CAD21AoAcfp5kdcsT5727Vw4JF-Rw7b73zXh_GwXqNHg3P7-UoA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 6, 2025 at 4:28 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
>
> On Fri, Jun 6, 2025 at 6:58 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > Agreed. Given the above test results, it's unlikely always sorting the
> > array helps speedups.
>
> Did you try specializing the sort? In my experience, it makes a big difference.

Thank you for the suggestion. I've done the same performance test with
the suggestion. The difference seems to be within an acceptable range.

HEAD PATCHED DIFF
case-6: 3,320 ms 3,374 ms 101.63%

I've attached the patches I used for this evaluation.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v3-0001-Fix-maxblkno-constant-to-use-MaxBlockNumber-in-te.patch application/octet-stream 1.7 KB
v3-0003-Convert-IndexBulkDeleteCallback-to-process-TIDs-i.patch application/octet-stream 9.3 KB
v3-0002-tidstore.c-introduce-TidStoreIsMemberMulti.patch application/octet-stream 5.7 KB
v3-0004-Use-batch-TIDs-lookup-in-btree-index-bulk-deletio.patch application/octet-stream 5.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jesper Pedersen 2025-06-09 19:48:49 Re: pg_rewind: Doc update for PostgreSQL 18
Previous Message Nathan Bossart 2025-06-09 19:15:02 Re: pg_rewind: Doc update for PostgreSQL 18