Re: memory leak in date_part() function in v7.1beta3 ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: doj <doj(at)cubic(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: memory leak in date_part() function in v7.1beta3 ?
Date: 2001-01-29 00:47:17
Message-ID: 11277.980729237@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

doj <doj(at)cubic(dot)org> writes:
> I was experimenting with the 7.1beta3 release. When I use the
> date_part() function in one query several thousand times (in updates for
> example) the postmaster consumes all available memory, until it dies,
> with a "no memory left error". If I execute the same queries without
> date_part() functions everything runs smooth.

It turns out this is not specific to date_part(date); in fact, *all*
SQL-language functions were leaking memory. I have fixed the leaks
exposed by this example and some related ones, but I suspect that
some complex queries inside SQL functions will still leak a small
amount of memory per execution. We really need to reconsider how
per-query data structures are allocated ... perhaps as part of the
long-threatened querytree redesign.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-01-29 06:40:17 Cannot drop and recreate "primary key" index
Previous Message Tom Lane 2001-01-27 19:16:50 Re: memory leak in date_part() function in v7.1beta3 ?