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

Re: BUG #4996: postgres.exe memory consumption keeps going up

From: "WANGRUNGVICHAISRI, SHIVESH" <sbw(at)appsig(dot)com>
To: "Craig Ringer" <craig(at)postnewspapers(dot)com(dot)au>
Cc: "pgsql-bugs" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #4996: postgres.exe memory consumption keeps going up
Date: 2009-08-27 15:06:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-hackers
Hi Craig,

Firstly, I would like to say I'm sorry for the stupid kind of query that I had in the test program. It did indeed make the test program appeared to be "leaking" and I obviously misinterpreted the result.

Secondly, thank you for taking the time to look into this issue. Your assessment was absolutely correct.

Lastly, I will respond to this thread one more time when I get an answer back from PostGIS regarding the leak that I see in the test I sent to them.

Thanks again.



-----Original Message-----
From: Craig Ringer [mailto:craig(at)postnewspapers(dot)com(dot)au] 
Sent: Wednesday, August 26, 2009 7:37 PM
Cc: pgsql-bugs
Subject: RE: [BUGS] BUG #4996: postgres.exe memory consumption keeps going up

On Wed, 2009-08-26 at 16:51 -0700, WANGRUNGVICHAISRI, SHIVESH wrote:

> However, I still insist that potentially the PostgreSQL community 
> might want to look into why making use of libpq causes the client 
> program's memory consumption to keep growing. This can be easily 
> observed using the earlier test program uploaded to here:

I've looked into it ... and concluded I'm an idiot.

Your query is:

	SELECT * FROM tmp WHERE id>615;

(where "615" could be any value < 1000)

For some reason I'd been thinking all along that the query was grabbing
*no* *more* *than* *1000* *rows* ... but of course it's not, it's grabbing all but some lower fraction of the rows. So the result set gets bigger and bigger over time until the program doesn't have enough RAM to hold the result set and it crashes.

The attached (adjusted) test program no longer has any issues with growth or runtime. There's no libpq issue here, only a my-brain-is-only-semifunctional issue.

So, it seems we've eliminated any issue with leakage in the PostgreSQL server backend, you've isolated your problem to PostGIS, and we've found that the growth of the test program was libpq working as designed.

It looks like we're done here.

Craig Ringer

In response to

pgsql-hackers by date

Next:From: Christopher BrowneDate: 2009-08-27 15:10:26
Subject: Re: 8.5 release timetable, again
Previous:From: Robert HaasDate: 2009-08-27 15:05:11
Subject: Re: 8.5 release timetable, again

pgsql-bugs by date

Next:From: Jalaj NegiDate: 2009-08-27 15:24:10
Subject: Re: BUG #5008: Server Startup Problem - When server is configured for SSL
Previous:From: Alvaro HerreraDate: 2009-08-27 15:00:38
Subject: Re: BUG #4996: postgres.exe memory consumption keeps going up

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