]> granicus.if.org Git - postgresql/commit
Fix ancient connection leak in dblink
authorJoe Conway <mail@joeconway.com>
Sat, 11 Mar 2017 21:32:40 +0000 (13:32 -0800)
committerJoe Conway <mail@joeconway.com>
Sat, 11 Mar 2017 21:32:40 +0000 (13:32 -0800)
commit82f3792a4f576a34495c6b65ba103941f0b69f49
tree3f1115da68b619eb98e28ad8368e40fbf5af060c
parent88f3743cb18db477aed3fc7eed7da1c43aea4146
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.org#F680AB59-6D6F-4026-9599-1BE28880273D@decibel.org
Discussion: (new) https://postgr.es/m/flat/0A3221C70F24FB45833433255569204D1F6ADF8C@G01JPEXMBYT05
Reported by: Jim Nasby and Takayuki Tsunakawa
contrib/dblink/dblink.c