-- partitioned table: two partitions, each containing a t-digest with vastly -- different compression values CREATE TABLE combine_crash_test(k int, d tdigest) PARTITION BY LIST (k); CREATE TABLE combine_crash_test_1 PARTITION OF combine_crash_test FOR VALUES IN (1); CREATE TABLE combine_crash_test_2 PARTITION OF combine_crash_test FOR VALUES IN (2); -- comp=10: BUFFER_SIZE=100 slots INSERT INTO combine_crash_test SELECT 1, tdigest(v::float8, 10) FROM generate_series(1,100) v; -- comp=10000: BUFFER_SIZE=10000 slots INSERT INTO combine_crash_test SELECT 2, tdigest(v::float8, 10000) FROM generate_series(1,10000) v; -- enough data to reliably trigger partitionwise aggregate INSERT INTO combine_crash_test SELECT * FROM combine_crash_test; INSERT INTO combine_crash_test SELECT * FROM combine_crash_test; INSERT INTO combine_crash_test SELECT * FROM combine_crash_test; ANALYZE combine_crash_test; -- force partitionwise parallel aggregate SET enable_partitionwise_aggregate = on; ERROR: unrecognized configuration parameter "enable_partitionwise_aggregate" SET max_parallel_workers_per_gather = 2; SET parallel_leader_participation = off; ERROR: unrecognized configuration parameter "parallel_leader_participation" SET parallel_setup_cost = 0; SET parallel_tuple_cost = 0; SET min_parallel_table_scan_size = 0; -- tdigest_combine(small, huge) EXPLAIN (COSTS OFF) SELECT tdigest(d) FROM combine_crash_test; QUERY PLAN -------------------------------------------------------------- Aggregate -> Gather Workers Planned: 1 -> Append -> Parallel Seq Scan on combine_crash_test_1 -> Parallel Seq Scan on combine_crash_test_2 (6 rows) SELECT tdigest(d) FROM combine_crash_test; tdigest ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- flags 1 count 80800 compression 10 centroids 15 (1.000000, 1) (1.000000, 1) (1.000000, 8) (7.514286, 70) (72.955357, 560) (553.198115, 4457) (2362.044921, 19345) (5389.714865, 40465) (7942.990790, 10532) (9201.278639, 3937) (9702.287749, 1053) (9928.826923, 312) (9990.647059, 51) (9999.285714, 7) (10000.000000, 1) (1 row) DROP TABLE combine_crash_test;