dbTalk Databases Forums  

[BUGS] BUG #1558: memory leak in libpq connectDBStart()

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1558: memory leak in libpq connectDBStart() in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Cade Cairns
 
Posts: n/a

Default [BUGS] BUG #1558: memory leak in libpq connectDBStart() - 03-26-2005 , 11:46 PM







The following bug has been logged online:

Bug reference: 1558
Logged by: Cade Cairns
Email address: cadec (AT) otii (DOT) com
PostgreSQL version: 8.0.1
Operating system: MacOSX 10.3.8
Description: memory leak in libpq connectDBStart()
Details:

The leak occurs when libpq can not establish a connection to the database
server, in my case when it is not running. I believe that when a caller
calls PQreset() or PQresetStart(), the subsequent call to connectDBStart()
clobbers the previous value of addrlist in the PGconn. Presumably,
closePGconn() should be destroying this value.

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1558: memory leak in libpq connectDBStart() - 03-27-2005 , 03:15 AM






"Cade Cairns" <cadec (AT) otii (DOT) com> writes:
Quote:
The leak occurs when libpq can not establish a connection to the database
server, in my case when it is not running. I believe that when a caller
calls PQreset() or PQresetStart(), the subsequent call to connectDBStart()
clobbers the previous value of addrlist in the PGconn. Presumably,
closePGconn() should be destroying this value.
Uh ... could we see a complete test case for this?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


Reply With Quote
  #3  
Old   
Cade Cairns
 
Posts: n/a

Default Re: [BUGS] BUG #1558: memory leak in libpq connectDBStart() - 04-02-2005 , 07:13 PM



I will post a patch in a few days. I am extremely busy and don't have
adequate time. I apologize for not having posted more in the first
place.

On 27-Mar-05, at 1:12 AM, Tom Lane wrote:

Quote:
"Cade Cairns" <cadec (AT) otii (DOT) com> writes:
The leak occurs when libpq can not establish a connection to the
database
server, in my case when it is not running. I believe that when a
caller
calls PQreset() or PQresetStart(), the subsequent call to
connectDBStart()
clobbers the previous value of addrlist in the PGconn. Presumably,
closePGconn() should be destroying this value.

Uh ... could we see a complete test case for this?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #4  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] BUG #1558: memory leak in libpq connectDBStart() - 05-06-2005 , 11:24 PM




Any more information on this?

---------------------------------------------------------------------------

Cade Cairns wrote:
Quote:
I will post a patch in a few days. I am extremely busy and don't have
adequate time. I apologize for not having posted more in the first
place.

On 27-Mar-05, at 1:12 AM, Tom Lane wrote:

"Cade Cairns" <cadec (AT) otii (DOT) com> writes:
The leak occurs when libpq can not establish a connection to the
database
server, in my case when it is not running. I believe that when a
caller
calls PQreset() or PQresetStart(), the subsequent call to
connectDBStart()
clobbers the previous value of addrlist in the PGconn. Presumably,
closePGconn() should be destroying this value.

Uh ... could we see a complete test case for this?

regards, tom lane


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.