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

From Tom Lane
Subject pgsql: Don't try to parallelize array_agg() on an anonymous record type
Date
Msg-id E1trKBZ-001cCf-2D@gemulon.postgresql.org
Whole thread Raw
List 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@dineserve.com>
Diagnosed-by: Richard Guo <guofenglinux@gmail.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: David Rowley <dgrowleyml@gmail.com>
Discussion:
https://postgr.es/m/atLI5Kce2ie1zcYjU0w_kjtVaxiYbYGTihrkLDmGZQnRDD4pnXukIATaABbnIj9pUnelC4ESvCXMm4HAyHg-v61XABaKpERj0A2IXzJZM7g=@dineserve.com
Backpatch-through: 16

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a7aa9f21f23ead3e04b073de66fdb56f5eb765a2

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(-)


pgsql-committers by date:

Previous
From: Nathan Bossart
Date:
Subject: pgsql: doc: Adjust note about pg_upgrade's --jobs option.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix test name and username used in failed connection attempts