Re: BitmapHeapScan streaming read user and prelim refactoring

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

On Mon, Feb 24, 2025 at 11:18 AM Melanie Plageman
<melanieplageman(at)gmail(dot)com> wrote:
>
> I changed my mind. I think since the struct I added was only used for
> tbm_extract_page_tuple(), it was a bit weird. I also think it is okay
> for callers to use TBM_MAX_TUPLES_PER_PAGE. I ended up revising this
> to use the same API you implemented for TIDStore in
> TidStoreGetBlockOffsets(). The caller passes an array and the size of
> the array and tbm_extract_page_tuple() fills in that many offsets and
> returns the total number of offsets. It avoids adding a new struct and
> means callers could pass a different value than
> TBM_MAX_TUPLES_PER_PAGE. Overall, I like it.

Okay, I've pushed those patches. All that remains in attached v34 are
the patches to implement using the read stream API. I'll wait to push
until the patches to modify the read stream API sequential detection
are in.

I was thinking about what the default value should be for
effective_io_concurrency, and I looked back at Tomas' results. It
definitely should be > 1. But, there are cases where 16 is a
regression. So, perhaps it would be good to run some tests trying out
4 and 8 once we have a fixed up sequential detection algorithm.

- Melanie

Attachment Content-Type Size
v34-0002-BitmapHeapScan-uses-the-read-stream-API.patch text/x-patch 28.9 KB
v34-0001-Separate-TBM-Shared-Private-Iterator-and-TBMIter.patch text/x-patch 19.4 KB
v34-0003-Remove-table-AM-callback-scan_bitmap_next_block.patch text/x-patch 22.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message James Hunter 2025-02-24 22:07:35 Re: Proposal: "query_work_mem" GUC, to distribute working memory to the query's individual operators
Previous Message Jacob Champion 2025-02-24 22:02:04 Re: [PoC] Federated Authn/z with OAUTHBEARER