memory leak occur when disconnect database

From: "tanjunhua" <tanjh(at)riso(dot)co(dot)jp>
To: "Postgres General Postgres General" <pgsql-general(at)postgresql(dot)org>
Subject: memory leak occur when disconnect database
Date: 2009-07-17 14:11:54
Message-ID: 022e01ca06e8$898255c0$aa1c10ac@RKC.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sharma, Sid 2009-07-17 14:17:15 Re: Idle in transaction
Previous Message Sharma, Sid 2009-07-17 14:05:24 Idle in transaction