The following bug has been logged online: Bug reference: 4996 Logged by: Shivesh Wangrungvichaisri Email address: s...@appsig.com PostgreSQL version: 8.3.7 Operating system: Windows XP x64 / Windows 7 x64 Description: postgres.exe memory consumption keeps going up Details:
Application: C++ 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. Reference: - What our command line looks like: http://picasaweb.google.com/shivesh/PostgresqlCommandLine#537169872221980512 2 - 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 want.) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs