[HACKERS] [bug fix] dblink leaks unnamed connections - Mailing list pgsql-hackers

From Tsunakawa, Takayuki
Subject [HACKERS] [bug fix] dblink leaks unnamed connections
Date
Msg-id 0A3221C70F24FB45833433255569204D1F6ADF8C@G01JPEXMBYT05
Whole thread Raw
Responses Re: [HACKERS] [bug fix] dblink leaks unnamed connections  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Hello,

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



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


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

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] CREATE/ALTER ROLE PASSWORD ('value' USING 'method')
Next
From: Amit Khandekar
Date:
Subject: Re: [HACKERS] Parallel Append implementation