]> granicus.if.org Git - postgresql/commit
Here is a bug and patch to fix it. I have tested this bug and fix on
authorBruce Momjian <bruce@momjian.us>
Thu, 27 Jul 2000 19:44:01 +0000 (19:44 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 27 Jul 2000 19:44:01 +0000 (19:44 +0000)
commite3b440066798b6692c79613783b7bc2cdeac8f82
treee23d861fec2397ebb8ef6a939cf788889fce9819
parent1ee0d4a9920fc0617c41f109873f71cacc772417
Here is a bug and patch to fix it. I have tested this bug and fix on
FreeBSD/Intel and DecUX/Alpha machines. The bug appears in postgresql
6.5.3 and 7.0.2. Can someone please review it and apply it to the
source tree?

Sometimes when the postgres connection dies it is necessary to
attempt to reconnect. Calling the pgconnection::Connect method in a
derived class leaks memory because it does not clear the current
connection (if there is one). These patches ensures that any open
connections are closed before attempting to open a new one.

-Michael Richards
src/interfaces/libpq++/pgconnection.cc
src/interfaces/libpq++/pgconnection.h