| From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
|---|---|
| To: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Questions and experiences writing a Foreign Data Wrapper |
| Date: | 2011-07-20 17:26:19 |
| Message-ID: | 4E270FBB.5050404@enterprisedb.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 20.07.2011 18:00, Albe Laurenz wrote:
> 2) If I decide to close remote database connections after
> use, I would like to do so where reasonable.
> I would like to keep the connection open between query
> planning and query execution and close it when the
> scan is done.
> The exception could be named prepared statements.
> Is there a way to tell if that is the case during
> planing or execution?
Hmm, maybe you could add a hook to close the connection when the
transaction ends. But actually, you'd want to keep the connection open
across transactions too. Some sort of a general connection caching
facility would be useful for many FDW.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2011-07-20 17:41:38 | lazy vxid locks, v3 |
| Previous Message | Robert Haas | 2011-07-20 17:18:46 | Re: [v9.2] SECURITY LABEL on shared database object |