#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007fd9fcac7801 in __GI_abort () at abort.c:79 #2 0x000055e09eb918a6 in ExceptionalCondition (conditionName=conditionName@entry=0x55e09ed427d0 "total_allocated == context->mem_allocated", errorType=errorType@entry=0x55e09ebe9e08 "FailedAssertion", fileName=fileName@entry=0x55e09ed42553 "aset.c", lineNumber=lineNumber@entry=1573) at assert.c:67 #3 0x000055e09ebb8565 in AllocSetCheck (context=context@entry=0x55e0a0414730) at aset.c:1573 #4 0x000055e09ebb8b54 in AllocSetAlloc (context=0x55e0a0414730, size=48) at aset.c:751 #5 0x000055e09ebc0436 in palloc (size=size@entry=48) at mcxt.c:963 #6 0x000055e09e6c89ab in minimal_tuple_from_heap_tuple (htup=0x55e0a03eec08) at heaptuple.c:1487 #7 0x000055e09e8d3edb in tts_buffer_heap_copy_minimal_tuple (slot=0x55e0a03eebb8) at execTuples.c:825 #8 0x000055e09ebc7a86 in ExecCopySlotMinimalTuple (slot=) at ../../../../src/include/executor/tuptable.h:465 #9 copytup_heap (state=0x55e0a040e820, stup=0x7ffdea921280, tup=) at tuplesort.c:3718 #10 0x000055e09ebcf0dc in tuplesort_puttupleslot (state=state@entry=0x55e0a040e820, slot=slot@entry=0x55e0a03eebb8) at tuplesort.c:1581 #11 0x000055e09e8ec28b in ExecIncrementalSort (pstate=0x55e0a03ee6f0) at nodeIncrementalSort.c:670 #12 0x000055e09e8cec81 in ExecProcNodeFirst (node=0x55e0a03ee6f0) at execProcnode.c:450 #13 0x000055e09e8ec264 in ExecProcNode (node=0x55e0a03ee6f0) at ../../../src/include/executor/executor.h:245 #14 ExecIncrementalSort (pstate=0x55e0a03ee4d8) at nodeIncrementalSort.c:638 #15 0x000055e09e8cec81 in ExecProcNodeFirst (node=0x55e0a03ee4d8) at execProcnode.c:450 #16 0x000055e09e8da237 in ExecProcNode (node=0x55e0a03ee4d8) at ../../../src/include/executor/executor.h:245 #17 fetch_input_tuple (aggstate=aggstate@entry=0x55e0a03ee0d8) at nodeAgg.c:411 #18 0x000055e09e8dce0f in agg_retrieve_direct (aggstate=aggstate@entry=0x55e0a03ee0d8) at nodeAgg.c:1782 #19 0x000055e09e8dd128 in ExecAgg (pstate=0x55e0a03ee0d8) at nodeAgg.c:1597 #20 0x000055e09e8cec81 in ExecProcNodeFirst (node=0x55e0a03ee0d8) at execProcnode.c:450 #21 0x000055e09e8eff77 in ExecProcNode (node=0x55e0a03ee0d8) at ../../../src/include/executor/executor.h:245 #22 ExecLimit (pstate=0x55e0a03eded0) at nodeLimit.c:95 #23 0x000055e09e8cec81 in ExecProcNodeFirst (node=0x55e0a03eded0) at execProcnode.c:450 #24 0x000055e09e8c6cfa in ExecProcNode (node=0x55e0a03eded0) at ../../../src/include/executor/executor.h:245 #25 ExecutePlan (estate=estate@entry=0x55e0a03edc90, planstate=0x55e0a03eded0, use_parallel_mode=, operation=operation@entry=CMD_SELECT, sendTuples=sendTuples@entry=true, numberTuples=numberTuples@entry=0, direction=ForwardScanDirection, dest=0x55e0a03fafd8, execute_once=true) at execMain.c:1646 #26 0x000055e09e8c79c7 in standard_ExecutorRun (queryDesc=0x55e0a0344b20, direction=ForwardScanDirection, count=0, execute_once=) at execMain.c:364 #27 0x000055e09e8c7a82 in ExecutorRun (queryDesc=queryDesc@entry=0x55e0a0344b20, direction=direction@entry=ForwardScanDirection, count=count@entry=0, execute_once=) at execMain.c:308 #28 0x000055e09ea66fbd in PortalRunSelect (portal=portal@entry=0x55e0a0387b70, forward=forward@entry=true, count=0, count@entry=9223372036854775807, dest=dest@entry=0x55e0a03fafd8) at pquery.c:912 #29 0x000055e09ea686b1 in PortalRun (portal=portal@entry=0x55e0a0387b70, count=count@entry=9223372036854775807, isTopLevel=isTopLevel@entry=true, run_once=run_once@entry=true, dest=dest@entry=0x55e0a03fafd8, altdest=altdest@entry=0x55e0a03fafd8, qc=0x7ffdea9217d0) at pquery.c:756 #30 0x000055e09ea646af in exec_simple_query (query_string=query_string@entry=0x55e0a03211e0 "SELECT a, b, c, d, count(*)\n FROM (SELECT * FROM t ORDER BY a, b, c) foo GROUP BY a, b, c, d\n LIMIT 100;") at postgres.c:1236 #31 0x000055e09ea6694a in PostgresMain (argc=, argv=argv@entry=0x55e0a034bc48, dbname=, username=) at postgres.c:4295 #32 0x000055e09e9d2d73 in BackendRun (port=port@entry=0x55e0a0341d70) at postmaster.c:4510 #33 0x000055e09e9d6039 in BackendStartup (port=port@entry=0x55e0a0341d70) at postmaster.c:4202 #34 0x000055e09e9d6353 in ServerLoop () at postmaster.c:1727 #35 0x000055e09e9d7785 in PostmasterMain (argc=3, argv=) at postmaster.c:1400 #36 0x000055e09e9205ae in main (argc=3, argv=0x55e0a031b900) at main.c:210