| From: | John Naylor <johncnaylorls(at)gmail(dot)com> |
|---|---|
| To: | David Geier <geidav(dot)pg(at)gmail(dot)com> |
| Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Improving scalability of Parallel Bitmap Heap/Index Scan |
| Date: | 2026-12-04 09:56:06 |
| Message-ID: | CANWCAZaOyRAjHQvnATD2weXLSRuNf2J0gev81Z9WUDmbE9xhdA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Oct 14, 2026 at 6:02 AM David Geier <geidav(dot)pg(at)gmail(dot)com> wrote:
> > 3. Test the above worst case
> >
> > If that doesn't prove to be too bad compared to dynamic work
> > portioning (i.e. does parallel index scan make up for the loss of
> > parallel heap scan), we can worry about the other details.
>
> See explanations above for why the worst-case with lots of data cannot
> realistically happen. To create a test for the worstcase, I would have
> to find block ranges for which murmurhash32() % nparticipants returns
> the same value and then use a WHERE clause which only returns rows in
> these block ranges. And that for a large number of block ranges.
>
> Or did you have something else in mind here?
(For when we return to this)
I'm not claiming the worst case can realistically happen, and I agree
with you there. I am claiming that static partitioning will likely
have some skew, and I'd be interested to know the upper bound of that
compared to master e.g.:
master: 1 worker index scan 4 workers heap scan
patch: 4 workers index scan 1 worker heap scan
> I tried testing the worst-case with little data where a single block
> range ends up in the same participant. But with so little data I didn't
> manage to trick the planner into choosing a parallel plan.
I was thinking you could use 50% fillfactor and run an update on the
right range of ctids to force all blocks to one table. A script can
generate the ctids.
On Fri, Dec 4, 2026 at 4:52 PM David Geier <geidav(dot)pg(at)gmail(dot)com> wrote:
> The next logical step would be getting [1] committed (batching TIDBitmap
> inserts from IndexAMs). The two patches together yield already a very
> significant speedup considering their low complexity.
Agreed.
--
John Naylor
Amazon Web Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nikhil Sontakke | 2026-12-04 10:03:38 | Re: DDL deparse |
| Previous Message | David Geier | 2026-12-04 09:52:18 | Re: Improving scalability of Parallel Bitmap Heap/Index Scan |