Re: memory leak occur when disconnect database - Mailing list pgsql-general

From Walton Hoops
Subject Re: memory leak occur when disconnect database
Date
Msg-id 003301ca0704$90944460$b1bccd20$@hopto.org
Whole thread Raw
In response to memory leak occur when disconnect database  ("tanjunhua" <tanjh@riso.co.jp>)
List pgsql-general
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@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of tanjunhua
Sent: Friday, July 17, 2009 8:12 AM
To: Postgres General Postgres General
Subject: [GENERAL] 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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Working around spurious unique constraint errors due to SERIALIZABLE bug
Next
From: Craig Ringer
Date:
Subject: Re: Please help