mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
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.
This commit is contained in:
@@ -165,6 +165,17 @@ typedef struct RelationData
|
||||
void *rd_amcache; /* available for use by index AM */
|
||||
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
|
||||
|
Reference in New Issue
Block a user