Re: FDW for PostgreSQL - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: FDW for PostgreSQL
Date
Msg-id 003001cda790$53b989d0$fb2c9d70$@lab.ntt.co.jp
Whole thread Raw
In response to Re: FDW for PostgreSQL  (Shigeru HANADA <shigeru.hanada@gmail.com>)
Responses Re: FDW for PostgreSQL
List pgsql-hackers
Hi Hanada-san,

> Please examine attached v2 patch (note that is should be applied onto
> latest dblink_fdw_validator patch).

I've reviewed your patch quickly.  I noticed that the patch has been created in
a slightly different way from the guidelines:
http://www.postgresql.org/docs/devel/static/fdw-planning.html  The guidelines
say the following, but the patch identifies the clauses in
baserel->baserestrictinfo in GetForeignRelSize, not GetForeignPaths.  Also, it
has been implemented so that most sub_expressions are evaluated at the remote
end, not the local end, though I'm missing something.  For postgresql_fdw to be
a good reference for FDW developers, ISTM it would be better that it be
consistent with the guidelines.  I think it would be needed to update the
following document or redesign the function to be consistent with the following
document.
   As an example, the FDW might identify some restriction clauses of the form
foreign_variable= sub_expression, which it determines can be executed on the
remote server given the locally-evaluated value of the sub_expression. The
actual identification of such a clause should happen during GetForeignPaths,
since it would affect the cost estimate for the path.

Thanks,

Best regards,
Etsuro Fujita




pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: change in LOCK behavior
Next
From: Dimitri Fontaine
Date:
Subject: Re: replace plugins directory with GUC