Memory Leak ?
am 08.06.2006 11:01:31 von zhaoxin
Hi,
I have a C++ application for testing memory leak that connects to
PostgreSQL8.1.3 Database using psqlODBC 08.01.02.00 unicode driver.
I have found some memory leak with the windows performance tool.
I have tried to upgrade the psqlODBC to 08.02.0002 ,but the leak still
exists.
The piece of my Code is like this:
SQLAllocHandle (SQL_HANDLE_ENV, NULL, &henv);
SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
SQLConnect (hDBC, szDSN, SQL_NTS, szUID, SQL_NTS, szPasswd, SQL_NTS);
SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
while( i < 10){
SQLPrepare(hstmt,(SQLCHAR*)szSql, SQL_NTS);
SQLBindParameter(......);
......
SQLExecute(hstmt);
SQLFreeStmt(hstmt,SQL_RESET_PARAMS);
}
SQLEndTran(SQL_HANDLE_DBC,(SQLHDBC)hdbc, SQL_COMMIT);
SQLFreeStmt(hstmt, SQL_CLOSE);
SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
SQLDisconnect(hdbc);
SQLFreeHandle(SQL_HANDLE_DBC, hdbc);
my Env: VC.net, windows2003 server, PostgreSQL8.1.3
some of you have faced similar issue for memory leak?
or I have made some misstake in Using the Odbc function?
If you could help me, that would be great!
thanks,
zhao
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
Re: Memory Leak ?
am 09.06.2006 13:20:05 von Ludek Finstrle
> SQLAllocHandle (SQL_HANDLE_ENV, NULL, &henv);
> SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
> SQLConnect (hDBC, szDSN, SQL_NTS, szUID, SQL_NTS, szPasswd, SQL_NTS);
> SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
> while( i < 10){
> SQLPrepare(hstmt,(SQLCHAR*)szSql, SQL_NTS);
> SQLBindParameter(......);
> ......
Please could you send us the exact szSql and their BindParameters
so we don't have to make steps into dark? BTW table structure and
some sample data could help too.
It speeds up finding the problem.
> SQLExecute(hstmt);
> SQLFreeStmt(hstmt,SQL_RESET_PARAMS);
> }
> SQLEndTran(SQL_HANDLE_DBC,(SQLHDBC)hdbc, SQL_COMMIT);
> SQLFreeStmt(hstmt, SQL_CLOSE);
> SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
> SQLDisconnect(hdbc);
> SQLFreeHandle(SQL_HANDLE_DBC, hdbc);
Regards,
Luf
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Re: Memory Leak ?
am 14.06.2006 13:40:22 von zhaoxin
to:Luf
Thanks for you response.
my test program is below ,and I expect for you help .
Table structure:
*************************************
CREATE TABLE TestLeak
( c1 int4,
c2 text,
c3 int4
)
*************************************
my program is like this:
*************************************
void testInsert(){
char *sqlInsert=3D"insert into TestLeak values(?,?)";
char szTmp[STR_LEN];//STR_LEN =3D 132
SQLINTEGER sOrderID=3D0 ,cbValue =3D SQL_NTS;=09
SQLINTEGER cbOrderID =3D 0 ;
int i;
//initialize
memset(szTmp,0,STR_LEN);
memset(szTmp,'a',STR_LEN-1);//insert 'a'
//INSERT
for(i =3D 0 ; i < count ; i++)
{
retcode =3D SQLPrepare(hstmt,(SQLCHAR*)sqlInsert,SQL_NTS);
SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT,
SQL_C_SLONG,SQL_INTEGER, 0, 0, &sOrderID, 0, &cbOrderID);
SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_CHAR,
SQL_CHAR,STR_LEN, 0, &szTmp, 0, &cbValue);
SQLBindParameter(hstmt, 3, SQL_PARAM_INPUT, SQL_C_SLONG,
SQL_INTEGER, 0, 0, &sOrderID, 0, &cbOrderID);
sOrderID =3D i;
retcode =3D SQLExecute(hstmt);
if( RC_NOTSUCCESSFUL(retcode))
{
exit_nicely();
}
}
retcode =3D SQLFreeStmt(hstmt,SQL_RESET_PARAMS);
SQLEndTran(SQL_HANDLE_DBC,(SQLHDBC)hdbc, SQL_COMMIT);
}
************************************************************ ******
thanks,
zhao
Ludek Finstrle wrote:
>> SQLAllocHandle (SQL_HANDLE_ENV, NULL, &henv);
>> SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
>> SQLConnect (hDBC, szDSN, SQL_NTS, szUID, SQL_NTS, szPasswd, SQL_NTS)=
;
>> SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
>> while( i < 10){
>> SQLPrepare(hstmt,(SQLCHAR*)szSql, SQL_NTS);
>> SQLBindParameter(......);
>> ......
>=20
>=20
> Please could you send us the exact szSql and their BindParameters
> so we don't have to make steps into dark? BTW table structure and
> some sample data could help too.
> It speeds up finding the problem.
>=20
>=20
>> SQLExecute(hstmt);
>> SQLFreeStmt(hstmt,SQL_RESET_PARAMS);
>> }
>> SQLEndTran(SQL_HANDLE_DBC,(SQLHDBC)hdbc, SQL_COMMIT);
>> SQLFreeStmt(hstmt, SQL_CLOSE);
>> SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
>> SQLDisconnect(hdbc);
>> SQLFreeHandle(SQL_HANDLE_DBC, hdbc);
>=20
>=20
> Regards,
>=20
> Luf
>=20
> ---------------------------(end of broadcast)--------------------------=
-
> TIP 2: Don't 'kill -9' the postmaster
>=20
--=20
以ä¸ããããã ã=E9=
¡ããããã¾ã ã=82
*******************************************
NEC-CAS åºç¤ã½ããã¦ã §ã=
¢éçºæ¬é¨ 第äºéç=
ºé=A8
è¶ãæ°
E-mail:zhaox@necas.nec.com.cn
Telel :8-0086-22-425
å¤ãç·=9A:(010)8233-4433-425
*******************************************
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
Re: Memory Leak ?
am 14.06.2006 23:43:15 von Hiroshi Inoue
zhaoxin wrote:
> to:Luf
>
> Thanks for you response.
> my test program is below ,and I expect for you help .
Could you try the dll at
http://www.geocities.jp/inocchichichi/psqlodbc/index.html ?
Recently I found a memory leak in some combination of connection
options.
regards,
Hiroshi Inoue
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Re: Memory Leak ?
am 15.06.2006 12:11:15 von zhaoxin
TO: Hiroshi Inoue
> Could you try the dll at
> http://www.geocities.jp/inocchichichi/psqlodbc/index.html ?
> Recently I found a memory leak in some combination of connection
> options.
I have tested the driver downloaded from this link .
but memory leak seems still exist .
regards,
zhao
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
Re: Memory Leak ?
am 15.06.2006 15:00:22 von Hiroshi Inoue
zhaoxin wrote:
> TO: Hiroshi Inoue
>
>> Could you try the dll at
>> http://www.geocities.jp/inocchichichi/psqlodbc/index.html ?
>> Recently I found a memory leak in some combination of connection
>> options.
> I have tested the driver downloaded from this link .
> but memory leak seems still exist .
Could you tell me your connection string ?
regards,
Hiroshi Inoue
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Re: Memory Leak ?
am 16.06.2006 03:22:38 von zhaoxin
TO:Hiroshi Inoue
>>> Could you try the dll at
>>> http://www.geocities.jp/inocchichichi/psqlodbc/index.html ?
>>> Recently I found a memory leak in some combination of connection
>>> options.
>>
>> I have tested the driver downloaded from this link .
>> but memory leak seems still exist .
>
>
> Could you tell me your connection string ?
My connection string is like this (with ODBC default settings):
SQLAllocHandle (SQL_HANDLE_ENV, NULL, &henv);
SQLSetEnvAttr(henv,SQL_ATTR_ODBC_VERSION,
(SQLPOINTER)SQL_OV_ODBC3,SQL_IS_INTEGER);
SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
SQLSetConnectOption(hdbc,SQL_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF);
SQLConnect(hdbc,(SQLCHAR*)szDSN, (SQLSMALLINT)strlen(szDSN),
(SQLCHAR*)szUID, (SQLSMALLINT)strlen(szUID),
(SQLCHAR*)szAuthStr, (SQLSMALLINT)strlen(szAuthStr));
SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
Re: Memory Leak ?
am 16.06.2006 04:45:42 von Hiroshi Inoue
zhaoxin wrote:
> TO:Hiroshi Inoue
>
>
>>>> Could you try the dll at
>>>> http://www.geocities.jp/inocchichichi/psqlodbc/index.html ?
>>>> Recently I found a memory leak in some combination of connection
>>>> options.
>>>
>>> I have tested the driver downloaded from this link .
>>> but memory leak seems still exist .
>>
>>
>> Could you tell me your connection string ?
>
> My connection string is like this (with ODBC default settings):
Could you tell me the option settings concretely ?
regards,
Hiroshi Inoue
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
Re: Memory Leak ?
am 16.06.2006 10:08:05 von Ludek Finstrle
> >>>Could you try the dll at
> >>> http://www.geocities.jp/inocchichichi/psqlodbc/index.html ?
> >>>Recently I found a memory leak in some combination of connection
> >>>options.
> >>
> >>I have tested the driver downloaded from this link .
> >>but memory leak seems still exist .
> >
> >
> >Could you tell me your connection string ?
>
> My connection string is like this (with ODBC default settings):
>
> SQLConnect(hdbc,(SQLCHAR*)szDSN, (SQLSMALLINT)strlen(szDSN),
> (SQLCHAR*)szUID, (SQLSMALLINT)strlen(szUID),
> (SQLCHAR*)szAuthStr, (SQLSMALLINT)strlen(szAuthStr));
Hiroshi needs to know the value for szDSN.
Regards,
Luf
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Re: Memory Leak ?
am 16.06.2006 11:03:14 von zhaoxin
>>>Could you tell me your connection string ?
>>
>>My connection string is like this (with ODBC default settings):
>>
>> SQLConnect(hdbc,(SQLCHAR*)szDSN, (SQLSMALLINT)strlen(szDSN),
>> (SQLCHAR*)szUID, (SQLSMALLINT)strlen(szUID),
>> (SQLCHAR*)szAuthStr, (SQLSMALLINT)strlen(szAuthStr));
>
>
> Hiroshi needs to know the value for szDSN.
>
ok,I see .
my connection string is below:
***************************
char szDSN[20];
char szUID[20];
char szAuthStr[20];
....
sprintf(szDSN,"postgre_8.02\0");
sprintf(szUID,"test\0");
sprintf(szAuthStr,"test\0");
....
***************************
is there some problem here ?
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Re: Memory Leak ?
am 16.06.2006 11:32:55 von Ludek Finstrle
Fri, Jun 16, 2006 at 05:03:14PM +0800, zhaoxin wrote:
> my connection string is below:
> ***************************
> char szDSN[20];
> char szUID[20];
> char szAuthStr[20];
> ...
> sprintf(szDSN,"postgre_8.02\0");
> sprintf(szUID,"test\0");
> sprintf(szAuthStr,"test\0");
> ...
> ***************************
> is there some problem here ?
I see no problem. We only want to simulate your situation.
We need to know the exact psqlODBC state.
Please could you send us mylog output?
Regards,
Luf
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
Re: Memory Leak ?
am 16.06.2006 15:55:15 von zhaoxin
This is a multi-part message in MIME format.
--------------020406050501050108070406
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
> I see no problem. We only want to simulate your situation.
> We need to know the exact psqlODBC state.
>
> Please could you send us mylog output?
I add the mylog file to the attachment .
I hope it is helpful .
>
> Regards,
>
> Luf
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
--------------020406050501050108070406
Content-Type: text/plain;
name="mylog_1372.log"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="mylog_1372.log"
[2784]globals.extra_systable_prefixes = 'dd_;'
[2784]aszKey='DSN', value='postgre_8.02'
[2784]copyAttributes: DSN='postgre_8.02',server='',dbase='',user='',passwd='xxxxx' ,port='',onlyread='',protocol='',conn_settings='',disallow_p remature=-1)
[2784]getDSNinfo: DSN=postgre_8.02 overwrite=0
[2784]globals.extra_systable_prefixes = 'dd_;'
[2784]rollback_on_error=1
[2784]globals.extra_systable_prefixes = 'dd_;'
[2784]calling getDSNdefaults
[2784]checking libpq library
[2784]hmodule=63100000
[2784]libpq_exist=1
[2784]DETACHING PROCESS
--------------020406050501050108070406
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
--------------020406050501050108070406--
Re: Memory Leak ?
am 16.06.2006 16:21:39 von zhaoxin
This is a multi-part message in MIME format.
--------------030000060607040504040704
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
zhaoxin wrote:
>
>> I see no problem. We only want to simulate your situation.
>> We need to know the exact psqlODBC state.
>>
>> Please could you send us mylog output?
>
>
> I add the mylog file to the attachment .
> I hope it is helpful .
sorry , the file I sended maybe is incorrect.
send again .
Regards,
zhao
--------------030000060607040504040704
Content-Type: application/octet-stream;
name="mylog_1792.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="mylog_1792.zip"
UEsDBBQAAAAIADCy0DSyPg2EUBYAAIADAgAOAAAAbXlsb2dfMTc5Mi5sb2ft
nW1z2kjWhr/nV/SnxX4KuySB8cuGbDGYcVzj2B5DpnYn5VIJqQFtZImRhJPs
r39Ot16QhMC8hOAht2dqDK3T3aePjrrvqyWPPmnnWv1x6Hh9wwmO+dfQN/Tg
WxAafYfrY58P7K88YE1WsSz9n5U3n6T5p0/d329ajuOZ7w3XcvjjY1T+f/TD
bJfdX7Xur3Vp0HGfGRW+SQwY/2qHBYMLNh5xsmuy2kA7PVGoQrajLg/JqBWG
/uMjM8KwqSlKtfaCK5ke2p7rcjO8YNwNuW+7w+Pj4zcZh8tMc/5UmUnl8mtt
MFDiup1b3aCgmFEV23MvWMCdwQu1WPRDNblFg2E2a8aWR+9KOg0+2Y+FA8nA
adxXPLx2B95BTTnMDTsuz414IEp638a8eXr6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nqIdwIib6Xmqp1r4vyqSjEWiXliHLWZs12uZXWFltWVWtZWaFlbqeWZrFzQ
ci2TiN/rUUe53Ld64llH8exVpocNHrej1UwsU+kTXnrflvoywzyMrKeyWaj7
zPNghshTyjpLqHwhUyK9nU6IcvKZ20neCXt5Lxrre1HSSyEWk1A+AmjnZol8
/5ayfhQyzb9ZcK6288xjQ5l55rFRX/jM46tILjUXVm1HyfWyF9tNriWisEpy
qeXJpWZSS82klirOzuLkmn2gVsTytSeXlgtrbUfJ9bIX202uJaKwSnJpu5+5
8LT2yk9rK/HT2o3kaW3bDbhP7OoSymeeWJbaNzj4V5X+Odz0ce3F9dRCLXXD
3uY8HL54oEq1UzHSn0pVSQct7gsmDwz0+ZBg3UjvXInta7npncS8cP639JT5
ukPZ5l5jrbbN5+t+6Vxd35aYlD5eJ43LGly+v+vbbuehx5T0RvuLnU5rvMJn
jvEHWXv9CNzf5g+yfiic7KsuhiTbL0nWgCQrHaha0DFqVpL9eFk13x38JR/+
km+f/pJP22ay7Jmyxl/z4a/58P/V2OuoA+OAccA4YBwwbi2M0wrcpO0W4+a7
A4wDxgHjgHHAOGAcMG7vog6MA8YB44BxwLi1MK5W4KbabjFuvjvAOGAcMA4Y
B4wDxgHj9i7qwDhgHDAOGAeMWwvj6gVuqu8W4+a7A4wDxgHjgHHAOGAcMG7v
og6MA8YB44BxwLi1MO6kwE0nu8W4+e4A44BxwDhgHDAOGAeM27uoA+OAccA4
YBwwbi2MaxS4qbFbjJvvzmvFuJpaVx4vO71W+714w8P9w1270+2++X9QSwEC
FAAUAAAACAAwstA0sj4NhFAWAACAAwIADgAAAAAAAAABACAAAAAAAAAAbXls
b2dfMTc5Mi5sb2dQSwUGAAAAAAEAAQA8AAAAfBYAAAAA
--------------030000060607040504040704
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
--------------030000060607040504040704--
Re: Memory Leak ?
am 19.06.2006 09:31:19 von Hiroshi Inoue
zhaoxin wrote:
>
>
> zhaoxin wrote:
>>
>>> I see no problem. We only want to simulate your situation.
>>> We need to know the exact psqlODBC state.
>>>
>>> Please could you send us mylog output?
>>
>>
>> I add the mylog file to the attachment .
>> I hope it is helpful .
>
> sorry , the file I sended maybe is incorrect.
> send again .
Were the data inserted properly when the log was taken ?
Judging from the log, the application seems to have
finished in the middle(6-th data) of the execution.
regards,
Hiroshi Inoue
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
Re: Memory Leak ?
am 19.06.2006 10:08:58 von zhaoxin
To:Hiroshi
> Were the data inserted properly when the log was taken ?
> Judging from the log, the application seems to have
> finished in the middle(6-th data) of the execution.
>
sorry , mybe not properly .
My program is like this :
loop :
connect db ;
insert 10 reocrds ;
commit;
update this 10 records ;
commit;
delete this 10 records ;
commit;
disconnect db;
end loop;
the loop is not terminable.
and I interrupted the program unproperly and took the log.
but I am sure it have run over one loop.
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
Re: Memory Leak ?
am 19.06.2006 10:59:53 von Hiroshi Inoue
zhaoxin wrote:
> To:Hiroshi
>
>> Were the data inserted properly when the log was taken ?
>> Judging from the log, the application seems to have
>> finished in the middle(6-th data) of the execution.
>>
> sorry , mybe not properly .
> My program is like this :
> loop :
> connect db ;
> insert 10 reocrds ;
> commit;
> update this 10 records ;
> commit;
> delete this 10 records ;
> commit;
> disconnect db;
> end loop;
> the loop is not terminable.
Well what do you mean by *Memory Leak* ?
Does the memory usage grow while repeating the loop ?
regards,
Hiroshi Inoue
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Re: Memory Leak ?
am 19.06.2006 11:29:55 von zhaoxin
Toï¼=9AHiroshi
>=20
> Well what do you mean by *Memory Leak* ?
> Does the memory usage grow while repeating the loop ?
>=20
yes , in my test , I found memory usage keep growing .
bwt I used windows performance tool.
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Re: Memory Leak ?
am 19.06.2006 11:47:20 von Hiroshi Inoue
zhaoxin wrote:
> Toï¼=9AHiroshi
>=20
>>
>> Well what do you mean by *Memory Leak* ?
>> Does the memory usage grow while repeating the loop ?
>>
> yes , in my test , I found memory usage keep growing .
> bwt I used windows performance tool.
I can't see the growth here with a similar test case.
Could you send me the test program(exe) ?
regards,
Hiroshi Inoue
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
Re: Memory Leak ?
am 19.06.2006 12:16:37 von zhaoxin
This is a multi-part message in MIME format.
--------------030607050502010804070508
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
To:Hiroshi Inoue
> I can't see the growth here with a similar test case.
> Could you send me the test program(exe) ?
ok , I add my cpp file to the attachment .
I hope you can help me .thanks
Regards,
zhao
--------------030607050502010804070508
Content-Type: text/plain;
name="TestOdbc.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="TestOdbc.cpp"
I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5j
bHVkZSA8d2luZG93cy5oPg0KI2luY2x1ZGUgPHNxbC5oPg0KI2luY2x1ZGUg
PHNxbGV4dC5oPg0KI2luY2x1ZGUgPHNxbHR5cGVzLmg+DQojaW5jbHVkZSA8
b2RiY3NzLmg+DQojaW5jbHVkZSA8cHJvY2Vzcy5oPg0KI2luY2x1ZGUgPHRp
bWUuaD4NCiNkZWZpbmUgUkNfU1VDQ0VTU0ZVTChyYykgKCgocmMpID09IFNR
TF9TVUNDRVNTKSB8fCAoKHJjKSA9PSBTUUxfU1VDQ0VTU19XSVRIX0lORk8p
KQ0KI2RlZmluZSBSQ19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FVzZXI+IDxQYXNzd29yZD4gPEludGVydmFsPiIpOw0KCQlyZXR1cm4oMCk7
DQoJfQ0KDQoJLy8tLS0tdGVzdCBiZWdpbi0tLS0tDQoJd2hpbGUodHJ1ZSl7
DQoJCWZwcmludGYoc3Rkb3V0LCJjb25uZWN0Li4uLlxuIik7DQoJCWluaXRE
QkNvbigpOw0KCQlmcHJpbnRmKHN0ZG91dCwiaW5zZXJ0Li4uLlxuIik7DQoJ
CXRlc3RJbnNlcnQoKTsNCgkJZnByaW50ZihzdGRvdXQsInVwZGF0ZS4uLi5c
biIpOw0KCQl0ZXN0VXBkYXRlKCk7DQoJCWZwcmludGYoc3Rkb3V0LCJkZWxl
dGUuLi4uXG4iKTsJDQoJCXRlc3REZWxldGUoKTsNCgkJU2xlZXAoMSoxMDAw
KTsNCgkJZnByaW50ZihzdGRvdXQsImZyZWUuLi4uXG4iKTsNCgkJZnJlZURC
Q29uKCk7DQoJfQ0KCS8vLS0tLXRlc3QgZW5kLS0tLS0NCglleGl0X25pY2Vs
eSgpOw0KfQ0KDQo=
--------------030607050502010804070508
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
--------------030607050502010804070508--
Re: Memory Leak ?
am 19.06.2006 15:55:56 von Hiroshi Inoue
zhaoxin wrote:
> Toï¼=9A Hiroshi
>
>>
>> Well what do you mean by *Memory Leak* ?
>> Does the memory usage grow while repeating the loop ?
>>
> yes , in my test , I found memory usage keep growing .
>
How many bytes does it grow per the loop ?
regards,
Hiroshi Inoue
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
Re: Memory Leak ?
am 20.06.2006 03:12:00 von zhaoxin
>>>
>>> Well what do you mean by *Memory Leak* ?
>>> Does the memory usage grow while repeating the loop ?
>>>
>> yes , in my test , I found memory usage keep growing .
>>
>
> How many bytes does it grow per the loop ?
>
I found it grows about 1k bytes per the loop.
In my test , the prgram loop about 30-40 times in one minute ,
and I founded 30-40K growth in one minute .
so , I think it leaks about 1k per the loop . is it right ?
regards,
zhao
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq