Hello,

dblink fails to close the unnamed connection as follows when a new unnamed 
connection is requested.  The attached patch fixes this.



postgres=# select count(*) from pg_stat_activity;
 count
-------
     1
(1 row)

postgres=# select dblink_connect('dbname=postgres');
 dblink_connect
----------------
 OK
(1 row)

postgres=# select count(*) from pg_stat_activity;
 count
-------
     2
(1 row)

postgres=# select dblink_connect('dbname=postgres');
 dblink_connect
----------------
 OK
(1 row)

postgres=# select count(*) from pg_stat_activity;
 count
-------
     3
(1 row)


Regards
Takayuki Tsunakawa

Attachment: dblink_leak_unnamed_conn.patch
Description: dblink_leak_unnamed_conn.patch

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to