Hackers, I'm getting the error in $subject and am only posting here because (a) the comments in src/backend/utils/mmgr/dsa.c circa line 720 suggest that this is a bug, and (b) the DSA code appears to be fairly new to the postgresql project, and perhaps not fully debugged.
I am running against a build from 291a31c42c893574e9676e00121e6c6915a59de5 REL_10_STABLE, on centos linux. I'm not asking for help configuring my system. If this is a run of the mill out of memory type error, I'll deal with it myself. But if this indicates a bug, I'll be happy to try to distill what I'm doing to a test case that I can share. (I've only hit this once, and have little idea whether it would be reproducible.) The gist of the query was an array_agg over the results of a parallel query over a partitioned table, executed from within a plpgsql function, like: SELECT ARRAY_AGG((a, latest, timelogged, b, cnt)::custom_composite_type) AS trans FROM (SELECT a, b, timelogged, MAX(timelogged) OVER (PARTITION BY a) AS latest, SUM(cnt) AS cnt FROM (SELECT a, b, timelogged, COUNT(*) AS cnt FROM mytable WHERE a= ANY('{65537,65538,65539,65540,65541,65542,65543,65544}'::OID[]) AND timelogged >= '2017-12-04 16:12:50-08'::TIMESTAMP AND timelogged < '2017-12-04 17:12:50-08'::TIMESTAMP GROUP BY a, b, timelogged ) AS ss GROUP BY a, b, timelogged ) AS s If this is not a bug, but rather something that users can hit through normal resource exhaustion, then perhaps the comments in dsa.c can be changed to make that clear. Thanks! mark