[postgis-devel] index leaks ?

strk strk at keybit.net
Fri Mar 12 14:31:24 PST 2004


On Fri, Mar 12, 2004 at 09:48:39AM -0500, Carl Anderson wrote:
> strk wrote:
> 
> > Hello,
> > I'm watching a strange beahviour by postgres,
> > I wonder if it's a memory leak:
> > 
> > Creating an index and destroying it makes the
> > postgres process grow in size. This is what I do:
> > 
> > create table test (a int);
> > create index test_idx on test (a); drop index test_idx;
> > create index test_idx on test (a); drop index test_idx;
> > create index test_idx on test (a); drop index test_idx;
> > ...
> > 
> > 
> > Can it be a memory leak in postgres code ?
> > 
> 
> curiously
> the first 3 times after connecting with psql
>    create index test_idx on test using gist (a); drop index test_idx;
> the SIZE, RSS, SHARE are all stable after each pass.
> 
> The 4th and subsequent tests grow the SIZE but not the SHARE.
> 
> quitting psql and repeating is giving the same delayed growth.
> As does letting the psql session sit quiet for several minutes then 
> repeating.
> 
> Does PG auto generate column stats slightly delayed after a create index ??
> 
> Pg 7.4.1

Tom Lane suggested me not to trust 'top' output.
I've been tested feeding the output of an infite loop
creating/destroying an index to psql.
Actually, even if top reported an increasing size, I couldn't
reach an OutOfMemory condition.

--strk;



More information about the postgis-devel mailing list