| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: possible connection leak in dblink? |
| Date: | 2011-06-17 19:21:01 |
| Message-ID: | 1308338461.16852.0.camel@vanquo.pezone.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On ons, 2011-06-15 at 11:41 +0900, Fujii Masao wrote:
> ISTM that the root problem is that dblink_send_query calls DBLINK_GET_CONN
> though it doesn't accept the connection string as an argument. Since the first
> argument in dblink_send_query must be the connection name, dblink_send_query
> should call DBLINK_GET_NAMED_CONN instead. The variable 'freeconn' is used
> only when DBLINK_GET_CONN is called. So, if dblink_send_query uses
> DBLINK_GET_NAMED_CONN instead, the variable 'freeconn' is no longer necessary.
>
> The similar problem exists in dblink_get_result and dblink_record_internal.
> Attached patch fixes those problems.
Is this a bug fix that should be backpatched?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Simon Riggs | 2011-06-17 19:34:26 | Re: ALTER TABLE lock strength reduction patch is unsafe |
| Previous Message | Robert Haas | 2011-06-17 19:15:34 | Re: ALTER TABLE lock strength reduction patch is unsafe |