Re: Feature proposal: www_fdw

From: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>
To: Florian Pflug <fgp(at)phlo(dot)org>
Cc: Alexander Soudakov <cygakob(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Feature proposal: www_fdw
Date: 2011-09-29 14:43:02
Message-ID: CAHHcrerSFyQr+36qKDUvNsYkO5usyXyub4T8qj6DmLZEqh=wug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/9/29 Florian Pflug <fgp(at)phlo(dot)org>:
> You could use a hash table, allocated in the top-level memory context,
> to store one authentication token per combination of server and local user.

In fact I started something in this way, with ldap_fdw, stashing the
connection away using memory context and something using es_query_cxt
from EState, just testing until now. How do this from PlanForeignScan
I couldn't figure out yet.

> I suggest you look at the MySQL FDW (https://github.com/dpage/mysql_fdw)
> - they presumably re-use the same connection over multiple foreign scans,
> which seems to be a problem similar to yours.

From what I understand they re-use between BeginForeignScan and the
subsequent IterateForeignScans and freeing at end. In my tests, there
is a (re)connection for each SELECT * FROM ...

I'm wondering that would be nice to have some built-in facilities
(like this kind of "cache" between calls) provided by www_fdw, for
that WWW API based FDWs.

Regards.
--
Dickson S. Guedes
mail/xmpp: guedes(at)guedesoft(dot)net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-09-29 14:45:00 Re: Does RelCache/SysCache shrink except when relations are deleted?
Previous Message Tom Lane 2011-09-29 14:33:57 Re: Does RelCache/SysCache shrink except when relations are deleted?