Re: [HACKERS] Everything leaks; How it mm suppose to work? - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] Everything leaks; How it mm suppose to work?
Date
Msg-id 352CC668.134F4FE7@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] Everything leaks; How it mm suppose to work?  ("Maurice Gittens" <mgittens@gits.nl>)
Responses Re: [HACKERS] Everything leaks; How it mm suppose to work?
List pgsql-hackers
> >Does it make sense to have a 'row' context which is released just
> >before starting with a new tuple ? The total number or free is the
> >same but they are distributed over the query and unused memory should
> >not accumulate.
> >I have seen backends growing to 40-60MB with queries which scan a
> >very large number of rows.
> I think this would be appropiate.

It seems that the CPU overhead on all queries would increase trying to
deallocate/reuse memory during the query. There are lots of places in
the backend where memory is palloc'd and then left lying around after
use; I had assumed it was sort-of-intentional to avoid having extra
cleanup overhead during a query.

                     - Tom

pgsql-hackers by date:

Previous
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: NetBSD configuration
Next
From: "SAMBATOV S"
Date:
Subject: unsubscribe