BUG #18843: ERROR: Input of anonymous composite types is not implemented in array_agg function

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: olgaantonova2(dot)0(at)yandex(dot)ru
Subject: BUG #18843: ERROR: Input of anonymous composite types is not implemented in array_agg function
Date: 2025-03-13 10:32:57
Message-ID: 18843-14736a1b899938e8@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18843
Logged by: Olga Antonova
Email address: olgaantonova2(dot)0(at)yandex(dot)ru
PostgreSQL version: 16.7
Operating system: Ubuntu 22.04.3 LTS
Description:

How to reproduce the problem:
1. Generate test data by pgbench with scale_factor 10
pgbench -i -s 10 -U postgres -p 5434 -d test
2. Run query in test database
select bid, array_agg(ROW(aid,abalance)) from pgbench_accounts group by
bid;
Result:
ERROR: 0A000: input of anonymous composite types is not implemented
LOCATION: record_recv, rowtypes.c:508
Query Plan:
QUERY PLAN
-----------------------------------------------------------------------------------------------------------
Finalize GroupAggregate (cost=23644.32..23646.93 rows=10 width=36)
Group Key: bid
-> Gather Merge (cost=23644.32..23646.65 rows=20 width=36)
Workers Planned: 2
-> Sort (cost=22644.29..22644.32 rows=10 width=36)
Sort Key: bid
-> Partial HashAggregate (cost=22644.00..22644.13 rows=10
width=36)
Group Key: bid
-> Parallel Seq Scan on pgbench_accounts
(cost=0.00..20560.67 rows=416667 width=12)
(9 rows)

When the problem does not reproduce:
1. Generate test data by pgbench with default scale_factor:
pgbench -i -U postgres -p 5434 -d test
2. Run the same query in test database:
select bid, array_agg(ROW(aid,abalance)) from pgbench_accounts group by
bid;
Result: The request was processed without errors.
Query Plan:
QUERY PLAN
-------------------------------------------------------------------------------
HashAggregate (cost=3140.00..3140.01 rows=1 width=36)
Group Key: bid
-> Seq Scan on pgbench_accounts (cost=0.00..2640.00 rows=100000
width=12)
(3 rows)

Expected result:
The query has the same behavior for any query plan.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2025-03-13 12:44:09 Re: BUG #18830: ExecInitMerge Segfault on MERGE
Previous Message Devrim Gündüz 2025-03-13 10:08:13 Re: BUG #18833: libpq.so doesn't contain declared symbol in rpm --provides