Jeremy Palmer <JPalmer@xxxxxxxxxxxx> writes: > Ok I have attached the map, or least what I think the map is. Yup, that's what I was after. It looks like the main problem is here: > PortalHeapMemory: 16384 total in 4 blocks; 5944 free (0 chunks); 10440 used > ExecutorState: 122880 total in 4 blocks; 63984 free (8 chunks); 58896 used > ExprContext: 2622363000 total in 9 blocks; 21080 free (15 chunks); 2622341920 used You've evidently got a leak during execution of a query that's being run in a "portal", which most likely is a cursor or plpgsql FOR-IN-SELECT query. Unfortunately there's not enough information here to tell which query that is, but maybe you can narrow it down now. I'm guessing that some specific function or operator you're using in that query is leaking memory with successive executions. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general