Re: BitmapHeapScan streaming read user and prelim refactoring

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(at)vondra(dot)me>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Subject: Re: BitmapHeapScan streaming read user and prelim refactoring
Date: 2025-01-22 21:24:19
Message-ID: CAAKRu_ZLSJUWeCMJj_VX3DzaNYXYmdYA=iBNXZW+kJiwmhYQRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 9, 2024 at 1:22 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> Are we planning to commit this refactoring? I think this refactoring
> makes the overall code of BitmapHeapNext() quite clean and readable.
> I haven't read all patches but 0001-0006 including 0009 makes this
> code quite clean and readable. I like the refactoring of merging of
> the shared iterator and the private iterator also.

Thanks for the feedback, Dilip. I've pushed the patches through 0006.

I've reorganized the remaining patches in attached v26.

0001 is just the refactoring to push the setup into a helper.
0002-0003 are required refactoring of the TBMIterateResult and
TBMIterator to support the read stream API.
0004 implements using the read stream API and removing the old prefetching code.
0005 removes the table_scan_bitmap_next_block() callback, as it is not
really used anymore in BitmapHeapNext() to get the next block.

I could use review feedback on all of them. 0001 should be ready to
push once I get some review.

0002 and 0003 shouldn't be committed without committing the read
stream commit because they are not improvements on their own. However,
I have an outstanding question in 0003 that I could use input on.

0004 needs another round of benchmarking.

0005 needs review once the others are dealt with.

- Melanie

Attachment Content-Type Size
v26-0001-Move-BitmapTableScan-per-scan-setup-into-a-helpe.patch text/x-patch 8.5 KB
v26-0004-BitmapHeapScan-uses-read-stream-API.patch text/x-patch 30.8 KB
v26-0003-Separate-TBM-Shared-Private-Iterator-and-TBMIter.patch text/x-patch 20.5 KB
v26-0002-Hard-code-TBMIterateResult-offsets-array-size.patch text/x-patch 5.3 KB
v26-0005-Remove-table-AM-callback-scan_bitmap_next_block.patch text/x-patch 22.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2025-01-22 21:33:45 Re: Set AUTOCOMMIT to on in script output by pg_dump
Previous Message Robert Pang 2025-01-22 21:18:00 Re: Purpose of wal_init_zero