diff options
| author | Alexander Korotkov | 2024-04-11 12:54:25 +0000 |
|---|---|---|
| committer | Alexander Korotkov | 2024-04-11 13:02:49 +0000 |
| commit | 922c4c461d213a422ee7eb6c38e399607539210a (patch) | |
| tree | dcd17814810d1637851b2012acd5bf12c018d463 /src/include/access | |
| parent | 8dd0bb84da7d56a9e41241b26bfbf6b79644d574 (diff) | |
Revert: Allow table AM to store complex data structures in rd_amcache
This commit reverts 02eb07ea89 per review by Andres Freund.
Discussion: https://postgr.es/m/20240410165236.rwyrny7ihi4ddxw4%40awork3.anarazel.de
Diffstat (limited to 'src/include/access')
| -rw-r--r-- | src/include/access/tableam.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h index ac24c999453..1cc395317e5 100644 --- a/src/include/access/tableam.h +++ b/src/include/access/tableam.h @@ -688,14 +688,6 @@ typedef struct TableAmRoutine */ /* - * This callback frees relation private cache data stored in rd_amcache. - * After the call all memory related to rd_amcache must be freed, - * rd_amcache must be set to NULL. If this callback is not provided, - * rd_amcache is assumed to point to a single memory chunk. - */ - void (*free_rd_amcache) (Relation rel); - - /* * See table_relation_size(). * * Note that currently a few callers use the MAIN_FORKNUM size to figure @@ -1817,32 +1809,6 @@ table_relation_analyze(Relation relation, AcquireSampleRowsFunc *func, */ /* - * Frees relation private cache data stored in rd_amcache. Uses - * free_rd_amcache method if provided. Assumes rd_amcache to point to single - * memory chunk otherwise. - */ -static inline void -table_free_rd_amcache(Relation rel) -{ - if (rel->rd_tableam && rel->rd_tableam->free_rd_amcache) - { - rel->rd_tableam->free_rd_amcache(rel); - - /* - * We are assuming free_rd_amcache() did clear the cache and left NULL - * in rd_amcache. - */ - Assert(rel->rd_amcache == NULL); - } - else - { - if (rel->rd_amcache) - pfree(rel->rd_amcache); - rel->rd_amcache = NULL; - } -} - -/* * Return the current size of `rel` in bytes. If `forkNumber` is * InvalidForkNumber, return the relation's overall size, otherwise the size * for the indicated fork. |
