diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-03-06 23:47:38 -0500 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-03-06 23:48:09 -0500 |
| commit | 1908abc4a37d397356c9cdf0fd31c33a86281d63 (patch) | |
| tree | 607be9f8752401246ad57e8b3371e62cf6120180 /src/include/utils/rel.h | |
| parent | 97951139164055d6bae5aae7ea058c28e1462253 (diff) | |
Arrange to cache FdwRoutine structs in foreign tables' relcache entries.
This saves several catalog lookups per reference. It's not all that
exciting right now, because we'd managed to minimize the number of places
that need to fetch the data; but the upcoming writable-foreign-tables patch
needs this info in a lot more places.
Diffstat (limited to 'src/include/utils/rel.h')
| -rw-r--r-- | src/include/utils/rel.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 06e1531e9a3..a4daf772e57 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -166,6 +166,17 @@ typedef struct RelationData Oid *rd_indcollation; /* OIDs of index collations */ /* + * foreign-table support + * + * rd_fdwroutine must point to a single memory chunk palloc'd in + * CacheMemoryContext. It will be freed and reset to NULL on a relcache + * reset. + */ + + /* use "struct" here to avoid needing to include fdwapi.h: */ + struct FdwRoutine *rd_fdwroutine; /* cached function pointers, or NULL */ + + /* * Hack for CLUSTER, rewriting ALTER TABLE, etc: when writing a new * version of a table, we need to make any toast pointers inserted into it * have the existing toast table's OID, not the OID of the transient toast |
