Skip site navigation (1) Skip section navigation (2)

Re: pgsql_fdw, FDW for PostgreSQL server

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
Subject: Re: pgsql_fdw, FDW for PostgreSQL server
Date: 2011-11-25 08:27:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Hi Hanada-san,

(2011/11/16 1:55), Shigeru Hanada wrote:
> Attached are revised version of pgsql_fdw patches.

I'm still under reviewing, so the following is not all.  I'm sorry.
estimate_costs() have been implemented to ask a remote postgres server
for the result of EXPLAIN for a remote query to get its costs such as
startup_cost and total_cost.  I think this approach is the most accurate
way to get its costs.  However, I think it would be rather costly.  And
I'm afraid of that it might work only for pgsql_fdw. Because, even if we
are able to obtain such a cost information by EXPLAINing a remote query
at a remote server where a DBMS different from postgres runs, it might
be difficult to incorporate such a cost information with the postgres
cost model due to their possible inconsistency that such a cost
information provided by the EXPLAIN command in the other DBMS might have
different meanings (or different scales) from that provided by the
EXPLAIN command in postgres.  So, I think it might be better to estimate
such costs by pgsql_fdw itself without EXPLAINing on the assumption that
a remote postgres server has the same abilities for query optimization,
which is less costly and widely applicable to the other DBMSs, while it,
of course, only works once we have statistics and/or index information
for foreign tables.  But AFAIK we eventually want to have those, so I'd
like to propose to use the proposed approach until that time.

Best regards,
Etsuro Fujita

In response to


pgsql-hackers by date

Next:From: Tomas VondraDate: 2011-11-25 09:43:03
Subject: Re: proposal : backend startup hook / after logon trigger
Previous:From: Pavel StehuleDate: 2011-11-25 06:14:56
Subject: Re: proposal: use errcontext for custom exception too

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group