summaryrefslogtreecommitdiff
path: root/src/test/regress/expected/aggregates.out
diff options
context:
space:
mode:
authorTom Lane2025-03-09 17:11:20 +0000
committerTom Lane2025-03-09 17:11:20 +0000
commitfedfcf66506fa9bf2259a88ae711e7ad7bde0011 (patch)
tree10841382b4fdb16b9c63177e4847399d9876c55f /src/test/regress/expected/aggregates.out
parent3c472a18296e473270b6ff611b898592263a6ed1 (diff)
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 <[email protected]> Diagnosed-by: Richard Guo <[email protected]> Author: Tom Lane <[email protected]> Reviewed-by: David Rowley <[email protected]> Discussion: https://postgr.es/m/atLI5Kce2ie1zcYjU0w_kjtVaxiYbYGTihrkLDmGZQnRDD4pnXukIATaABbnIj9pUnelC4ESvCXMm4HAyHg-v61XABaKpERj0A2IXzJZM7g=@dineserve.com Backpatch-through: 16
Diffstat (limited to 'src/test/regress/expected/aggregates.out')
-rw-r--r--src/test/regress/expected/aggregates.out20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/test/regress/expected/aggregates.out b/src/test/regress/expected/aggregates.out
index 8c4f8ce27ed..6b6371c3e74 100644
--- a/src/test/regress/expected/aggregates.out
+++ b/src/test/regress/expected/aggregates.out
@@ -2151,8 +2151,8 @@ explain (costs off) select * from v_pagg_test order by y;
-> Parallel Seq Scan on pagg_test
(13 rows)
-set max_parallel_workers_per_gather = 0;
-- Ensure results are the same without parallel aggregation.
+set max_parallel_workers_per_gather = 0;
select * from v_pagg_test order by y;
y | tmin | tmax | tndistinct | bmin | bmax | bndistinct | amin | amax | andistinct | aamin | aamax | aandistinct
---+------+------+------------+------+------+------------+------+------+------------+-------+-------+-------------
@@ -2168,6 +2168,24 @@ select * from v_pagg_test order by y;
9 | 19 | 4999 | 250 | 1019 | 999 | 250 | 19 | 4999 | 250 | 19 | 4999 | 250
(10 rows)
+-- Check that we don't fail on anonymous record types.
+set max_parallel_workers_per_gather = 2;
+explain (costs off)
+select array_dims(array_agg(s)) from (select * from pagg_test) s;
+ QUERY PLAN
+--------------------------------------------
+ Aggregate
+ -> Gather
+ Workers Planned: 2
+ -> Parallel Seq Scan on pagg_test
+(4 rows)
+
+select array_dims(array_agg(s)) from (select * from pagg_test) s;
+ array_dims
+------------
+ [1:5000]
+(1 row)
+
-- Clean up
reset max_parallel_workers_per_gather;
reset bytea_output;