8.1.8 is pretty old. Also you'll have better luck getting help if you actually include the output from Valgrind. -----Original Message----- From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of tanjunhua Sent: Friday, July 17, 2009 8:12 AM To: Postgres General Postgres General Subject: memory leak occur when disconnect database I'm running postgres 8.1.8 on Debian and I think memory leak occur when disconnect database. 1. environment setting 1.1 postgresql version: version ---------------------------------------------------------------------------- ----------------------------------- PostgreSQL 8.1.8 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) (1 row) 1.2 kernel version: Linux PMS 2.6.18-4-686 #2 SMP Fri Aug 1 22:47:38 JST 2008 i686 GNU/Linux 2. test example: int OpenDataBase(void) { int i_ret = 0; EXEC SQL CONNECT TO test_db; if(sqlca.sqlcode == 0){ i_ret = 1; } return i_ret; } sint8 CloseDataBase(void) { sint8 i_ret = !0; EXEC SQL disconnect all; if(sqlca.sqlcode == 0){ i_ret = 0; } return i_ret; } int main() { OpenDataBase(); CloseDataBase(); } when I use valgrind to check memory information, the memory leak is in view. would anyone give me a suggestion. I'm looking forward your help. best wishes. -- Winsea. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general