pgsql: Allow statistics to be collected for foreign tables. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Allow statistics to be collected for foreign tables.
Date
Msg-id E1SGEQs-0005gL-L3@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Allow statistics to be collected for foreign tables.

ANALYZE now accepts foreign tables and allows the table's FDW to control
how the sample rows are collected.  (But only manual ANALYZEs will touch
foreign tables, for the moment, since among other things it's not very
clear how to handle remote permissions checks in an auto-analyze.)

contrib/file_fdw is extended to support this.

Etsuro Fujita, reviewed by Shigeru Hanada, some further tweaking by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/263d9de66b867b7800fac82c222e004b795b724a

Modified Files
--------------
contrib/file_fdw/file_fdw.c                |  248 +++++++++++++++++++++++++---
doc/src/sgml/fdwhandler.sgml               |   42 +++++-
doc/src/sgml/maintenance.sgml              |   10 +
doc/src/sgml/ref/alter_foreign_table.sgml  |   28 +++
doc/src/sgml/ref/analyze.sgml              |   10 +-
src/backend/commands/analyze.c             |  146 ++++++++++++-----
src/backend/commands/tablecmds.c           |    7 +-
src/bin/psql/describe.c                    |    6 +-
src/bin/psql/tab-complete.c                |   17 ++-
src/include/commands/vacuum.h              |    3 +
src/include/foreign/fdwapi.h               |   24 +++-
src/test/regress/expected/foreign_data.out |   39 +++--
src/test/regress/sql/foreign_data.sql      |    3 +
13 files changed, 484 insertions(+), 99 deletions(-)


pgsql-committers by date:

Previous
From: Shigeru HANADA
Date:
Subject: Re: pgsql: Add DROP INDEX CONCURRENTLY [IF EXISTS], uses ShareUpdateExclusi
Next
From: Tom Lane
Date:
Subject: pgsql: Dept of second thoughts: improve the API for AnalyzeForeignTable