1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Dept of second thoughts: improve the API for AnalyzeForeignTable.

If we make the initially-called function return the table physical-size
estimate, acquire_inherited_sample_rows will be able to use that to
allocate numbers of samples among child tables, when the day comes that
we want to support foreign tables in inheritance trees.
This commit is contained in:
Tom Lane
2012-04-06 16:04:10 -04:00
parent 263d9de66b
commit cea49fe82f
4 changed files with 121 additions and 118 deletions

View File

@@ -53,11 +53,11 @@ typedef void (*EndForeignScan_function) (ForeignScanState *node);
typedef int (*AcquireSampleRowsFunc) (Relation relation, int elevel,
HeapTuple *rows, int targrows,
double *totalrows,
double *totaldeadrows,
BlockNumber *totalpages);
typedef AcquireSampleRowsFunc (*AnalyzeForeignTable_function) (Relation relation);
double *totaldeadrows);
typedef bool (*AnalyzeForeignTable_function) (Relation relation,
AcquireSampleRowsFunc *func,
BlockNumber *totalpages);
/*
* FdwRoutine is the struct returned by a foreign-data wrapper's handler