Ulrich Weber uweber at astaro.com
Fri Apr 30 05:33:27 PDT 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

finally I found the memory leak I was searching for:

The remoteListenThread is subscribed to notifications events,
however the events are never removed from the queue.

Don't know if the postgresql notifications are still needed,
because they got removed in slony1-2. I added a simple
+       while ((notification = PQnotifies(conn->dbconn)) != NULL)
+               PQfreemem(notification);
but maybe the whole listen/unlisten statements can be removed anyway ??

I also removed the "SlonDString lsquery" variable in
remoteWorkerThread_main,
seems not to be used.


@Steve Singer: Thanks for your feedback, moved the dstring_free()
call after the while loop.


In 2.0.3 I found some other memory leaks. Also there seems to be a
typo in cleanupThread_main():
- -                               vrc = PQresultStatus(res);
+                               vrc = PQresultStatus(res2);

Best regards,
 Ulrich

- --
Ulrich Weber | uweber at astaro.com | Software Engineer
Astaro GmbH & Co. KG | www.astaro.com | Phone +49-721-25516-0 | Fax –200
An der RaumFabrik 33a | 76227 Karlsruhe | Germany
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkvazhcACgkQ22t2oTuElzoePACeNUcsLSGPZYIMIX1vtnBqyj3H
kD4AoK3nVO8/Mnp1p2TY1wDOjWhZ1fqj
=I3Uk
-----END PGP SIGNATURE-----

-------------- next part --------------
A non-text attachment was scrubbed...
Name: slony1-1.2.21_memleak.patch
Type: text/x-patch
Size: 2199 bytes
Desc: not available
Url : http://lists.slony.info/pipermail/slony1-hackers/attachments/20100430/a6751f80/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slony1-2.0.3_memleak.patch
Type: text/x-patch
Size: 3328 bytes
Desc: not available
Url : http://lists.slony.info/pipermail/slony1-hackers/attachments/20100430/a6751f80/attachment-0001.bin 


More information about the Slony1-hackers mailing list