Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group