Re: review: FDW API - Mailing list pgsql-hackers

From Shigeru HANADA
Subject Re: review: FDW API
Date
Msg-id 20110207160037.8721.6989961C@metrosystems.co.jp
Whole thread Raw
In response to Re: review: FDW API  (Shigeru HANADA <hanada@metrosystems.co.jp>)
Responses Re: review: FDW API  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Mon, 31 Jan 2011 22:00:55 +0900
Shigeru HANADA <hanada@metrosystems.co.jp> wrote:
> I'll post FDW API patches which reflect comments first, and then I'll
> rebase postgresql_fdw against them.

Sorry for late, attached are revised version of FDW API patches which
reflect Heikki's comments except removing catalog lookup via
IsForeignTable().  ISTM that the point is avoiding catalog lookup
during planning, but I have not found when we can set "foreign table
flag" without catalog lookup during RelOptInfo generation.

Please apply attached patches in this order.

    1) fdw_catalog_lookup.patch
    2) fdw_handler.patch
    3) foreign_scan.patch

To execute SELECT quereis for foreign tables, you need a FDW which has
valid fdwhandler function.  The file_fdw which is posted in another
thread "SQL/MED file_fdw" would help.

Changes from last patches are:

1) Now SELECT FOR UPDATE check for foreign tables are done properly in
executor phase, in ExecLockTuple().  Or such check should be done in
parser or planner?

2) Server version is checked in pg_dump (>= 90100).

3) ReScan is not required now.  If ReScan is not supplied, ForeignScan
uses EndScan + BeginSacn instead.

4) FDW-Info in EXPLAIN is shown always, except FDW set NULL to
explainInfo.

Regards,
--
Shigeru Hanada

Attachment

pgsql-hackers by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: pg_dump directory archive format / parallel pg_dump
Next
From: Shigeru HANADA
Date:
Subject: Re: SQL/MED - file_fdw