Re: [v9.3] writable foreign tables - Mailing list pgsql-hackers

From Shigeru HANADA
Subject Re: [v9.3] writable foreign tables
Date
Msg-id 503B4C2C.7080206@gmail.com
Whole thread Raw
In response to [v9.3] writable foreign tables  (Kohei KaiGai <kaigai@kaigai.gr.jp>)
Responses Re: [v9.3] writable foreign tables
List pgsql-hackers
Kaigai-san,

On Thu, Aug 23, 2012 at 2:10 PM, Kohei KaiGai <kaigai@kaigai.gr.jp> wrote:
> The patched portion at contrib/file_fdw.c does not make sense
> actually. It just prints messages for each invocation.
> It is just a proof-of-concept to show possibility of implementation
> based on real RDBMS.

Attached is a tar ball of pgsql_fdw.  It's WIP and contains no
document, but it would be enough for your PoC purpose.  Usage and
features are same as the last version posted for 9.2 cycle.
# I'll post finished patch in the CF-Sep.

Here are random comments for your PoC patch:

+ As Robert says, using CTID as virtual tuple identifier doesn't seem
nice when considering various FDWs for NoSQL or RDBMS.  Having abstract
layer between FDWs and tuple sounds better, but implementing it by each
FDW seems useless effort.  Do yo have any idea of generic mechanism for
tuple mapping?

+ Do you have any plan about deparsing local qualifiers into remote
query to avoid repeated query submission?  This would improve
performance of big UPDATE, but its use case might be limited to
statements which consist of one foreign table.  For this case, we can
consider pass-through mode as second way.

+ I have not read your patch closely yet, but I wonder how we can know
which column is actually updated.  If we have only updated image of
tuple, we have to update all remote columns by "new" values?

--
Shigeru Hanada

Attachment

pgsql-hackers by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: [v9.3] writable foreign tables
Next
From: Dimitri Fontaine
Date:
Subject: Re: Event Triggers reduced, v1