pgsql: Fix ancient connection leak in dblink

From: Joe Conway <mail(at)joeconway(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix ancient connection leak in dblink
Date: 2017-03-11 21:35:18
Message-ID: E1cmofW-00079w-8p@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix ancient connection leak in dblink

When using unnamed connections with dblink, every time a new
connection is made, the old one is leaked. Fix that.

This has been an issue probably since dblink was first committed.
Someone complained almost ten years ago, but apparently I decided
not to pursue it at the time, and neither did anyone else, so it
slipped between the cracks. Now that someone else has complained,
fix in all supported branches.

Discussion: (orig) https://postgr.es/m/flat/F680AB59-6D6F-4026-9599-1BE28880273D%40decibel(dot)org#F680AB59-6D6F-4026-9599-1BE28880273D(at)decibel(dot)org
Discussion: (new) https://postgr.es/m/flat/0A3221C70F24FB45833433255569204D1F6ADF8C(at)G01JPEXMBYT05
Reported by: Jim Nasby and Takayuki Tsunakawa

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/82f3792a4f576a34495c6b65ba103941f0b69f49

Modified Files
--------------
contrib/dblink/dblink.c | 4 ++++
1 file changed, 4 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Joe Conway 2017-03-11 21:35:20 pgsql: Fix ancient connection leak in dblink
Previous Message Joe Conway 2017-03-11 21:35:16 pgsql: Fix ancient connection leak in dblink