Re: pgsql_fdw, FDW for PostgreSQL server - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgsql_fdw, FDW for PostgreSQL server
Date
Msg-id 5092.1333643363@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql_fdw, FDW for PostgreSQL server  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Responses Re: pgsql_fdw, FDW for PostgreSQL server  (Shigeru HANADA <shigeru.hanada@gmail.com>)
List pgsql-hackers
"Albe Laurenz" <laurenz.albe@wien.gv.at> writes:
> I think that the price of a remote table scan is something
> we should be willing to pay for good local statistics.
> And there is always the option not to analyze the foreign
> table if you are not willing to pay that price.

> Maybe the FDW API could be extended so that foreign data wrappers
> can provide a random sample to avoid a full table scan.

The one thing that seems pretty clear from this discussion is that one
size doesn't fit all.  I think we really ought to provide a hook so that
the FDW can determine whether ANALYZE applies to its foreign tables at
all, and how to obtain the sample rows if it does.

Since we've already whacked the FDW API around in incompatible ways for
9.2, now is probably a good time to add that.  I'm inclined to say this
should happen whether or not we accept any of the currently proposed
patches for 9.2, because if the hook is there it will provide a way for
people to experiment with foreign-table ANALYZE operations outside of
core.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_upgrade improvements
Next
From: Marko Kreen
Date:
Subject: Re: Speed dblink using alternate libpq tuple storage