| From: | Alain LESAGE <alain(dot)lesage(at)dalibo(dot)com> |
|---|---|
| To: | Mario Karuza <mkaruza(dot)pg(at)icloud(dot)com> |
| Cc: | Xiaoxuan Li <xiaoxuan(dot)li(dot)dev(at)gmail(dot)com>, Ethan Tran <ethantran(at)quwin(dot)dev>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Improve hash aggregate spilling by writing only the needed columns |
| Date: | 2026-11-30 10:22:45 |
| Message-ID: | b65060a0-ad45-4320-88ab-ccf8c9dcc903@dalibo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Mario,
For what it's worth, here are some regression tests along the lines
Ethan suggested. 0002 adds two tests to aggregates.sql, on a table
where the aggregate only needs some of the columns, so that spilled
tuples go through the new code: one with NULLs, text and numeric
values and respilling (with JIT), one with a rescan under a lateral
join. Only two of the existing spill queries reach that code. The new
tests pass on master and v2 and add about 75 ms.
0001 is your v2, unchanged.
Regards,
Alain
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Write-only-the-needed-columns-to-hash-aggregate-s.patch | text/x-patch | 9.9 KB |
| v2-0002-Add-tests-for-hash-aggregate-spilling-with-unneed.patch | text/x-patch | 5.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dmitry Fomin | 2026-11-30 10:24:47 | Re: [PATCH v1 0/7] Wait event timing and tracing instrumentation |
| Previous Message | Shlomi Noach | 2026-11-30 10:12:46 | Exported snapshot of CREATE_REPLICATION_SLOT can lose tuples to pruning |