pgsql: Don't try to parallelize array_agg() on an anonymous record type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Don't try to parallelize array_agg() on an anonymous record type
Date: 2025-03-09 17:11:33
Message-ID: E1trKBZ-001cCd-2A@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Don't try to parallelize array_agg() on an anonymous record type.

This doesn't work because record_recv requires the typmod that
identifies the specific record type (in our session) and
array_agg_deserialize has no convenient way to get that information.
The result is an "input of anonymous composite types is not
implemented" error.

We could probably make this work if we had to, but it does not seem
worth the trouble, given that it took this long to get a field report.
Just shut off parallelization, as though record_recv didn't exist.

Oversight in commit 16fd03e95. Back-patch to v16 where that
came in.

Reported-by: Kirill Zdornyy <kirill(at)dineserve(dot)com>
Diagnosed-by: Richard Guo <guofenglinux(at)gmail(dot)com>
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Reviewed-by: David Rowley <dgrowleyml(at)gmail(dot)com>
Discussion: https://postgr.es/m/atLI5Kce2ie1zcYjU0w_kjtVaxiYbYGTihrkLDmGZQnRDD4pnXukIATaABbnIj9pUnelC4ESvCXMm4HAyHg-v61XABaKpERj0A2IXzJZM7g=@dineserve.com
Backpatch-through: 16

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/43847dd5e93816ef6e37dfb6c8bb7f98f48ddc01

Modified Files
--------------
src/backend/parser/parse_agg.c | 11 ++++++++++-
src/test/regress/expected/aggregates.out | 20 +++++++++++++++++++-
src/test/regress/sql/aggregates.sql | 9 +++++++--
3 files changed, 36 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2025-03-09 18:19:18 pgsql: Fix test name and username used in failed connection attempts
Previous Message Alexander Korotkov 2025-03-09 02:53:29 Re: pgsql: reindexdb: Add the index-level REINDEX with multiple jobs