Re: injection points for hash aggregation

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: injection points for hash aggregation
Date: 2025-02-03 23:54:27
Message-ID: fc1fef801103bba1849aa30ff5e06f4090abee80.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2025-02-03 at 12:45 -0800, Jeff Davis wrote:
> * The patch allows forcing the partition fan-out to one. I could
> imagine forcing it to a specific value, is there a way to do that?

I hit "send" too quickly and this caused test failures in CI. Attaching
v2.

Changes:

* a new injection point to force spilling at 1000 tuples so that the
test is deterministic (required some minor refactoring in
hash_agg_check_limits())
* added a branch to guard against a shift-by-32, which could not
happen in the code before, because the number of partitions was a
minimum of 4
* minor refactor of hash_agg_set_limits() to avoid an implicit
assumption. This is not directly related, so I added it as a separate
patch.

Regards,
Jeff Davis

Attachment Content-Type Size
v2-0001-Add-injection-points-for-hash-aggregation.patch text/x-patch 9.7 KB
v2-0002-Minor-refactor-of-hash_agg_set_limits.patch text/x-patch 2.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-02-04 00:21:49 Re: injection points for hash aggregation
Previous Message Peter Smith 2025-02-03 23:38:44 Re: Introduce XID age and inactive timeout based replication slot invalidation