Обсуждение: pgsql: Allow statistics to be collected for foreign tables.

Поиск
Список
Период
Сортировка

pgsql: Allow statistics to be collected for foreign tables.

От
Tom Lane
Дата:
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(-)