The following bug has been logged online:
Bug reference: 4996
Logged by: Shivesh Wangrungvichaisri
Email address: sbw(at)appsig(dot)com
PostgreSQL version: 8.3.7
Operating system: Windows XP x64 / Windows 7 x64
Description: postgres.exe memory consumption keeps going up
Connector: libpq that came with 8.3.7
Problem: postgres.exe memory consumption keeps going up. (Working set and
Sharable as viewed from Windows Task Manager)
Steps to reproduce problem:
1) Create a test table
2) Using a C++ program, create 2 threads.
3) First thread will keep doing an INSERT of anything.
4) Second thread will keep doing a SELECT of anything.
5) Do NOT call PQfinish on PGconn. Rather, keep the connection opened after
each query is finished.
6) PGresult, of course, should be PQClear after every query.
7) Look in Windows Task manager. Since there were 2 threads that opened the
connection, there will be 2 postgres.exe whose memory consumption keeps
going up slowly.
8) In our real application, since we INSERT a large amount of data per
query, as well as SELECT a large amount of data per query, the memory leak
is much worse, and postgres.exe crashes after its memory consumption has
reached about 1.8GB.
- What our command line looks like:
- Example code that should demonstrate the problem:
http://stackoverflow.com/questions/1280513/posgressql-memory-leaque (note we
use Intel TBB to launch threads..you can use whatever thread library you
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 2009-08-19 15:53:49|
|Subject: Re: explain root element for auto-explain|
|Previous:||From: Jeff Janes||Date: 2009-08-19 15:43:50|
|Subject: Re: REGRESS_OPTS versus MSVC build scripts|
pgsql-bugs by date
|Next:||From: Magnus Hagander||Date: 2009-08-19 19:56:50|
|Subject: Re: BUG #4961: pg_standby.exe crashes with no args|
|Previous:||From: Tom Lane||Date: 2009-08-19 14:43:16|
|Subject: Re: BUG #4993: memory issue with array_agg |