|
|
|
@ -2269,7 +2269,9 @@ RelationReloadIndexInfo(Relation relation) |
|
|
|
|
RelationCloseSmgr(relation); |
|
|
|
|
|
|
|
|
|
/* Must free any AM cached data upon relcache flush */ |
|
|
|
|
table_free_rd_amcache(relation); |
|
|
|
|
if (relation->rd_amcache) |
|
|
|
|
pfree(relation->rd_amcache); |
|
|
|
|
relation->rd_amcache = NULL; |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* If it's a shared index, we might be called before backend startup has |
|
|
|
@ -2489,7 +2491,8 @@ RelationDestroyRelation(Relation relation, bool remember_tupdesc) |
|
|
|
|
pfree(relation->rd_options); |
|
|
|
|
if (relation->rd_indextuple) |
|
|
|
|
pfree(relation->rd_indextuple); |
|
|
|
|
table_free_rd_amcache(relation); |
|
|
|
|
if (relation->rd_amcache) |
|
|
|
|
pfree(relation->rd_amcache); |
|
|
|
|
if (relation->rd_fdwroutine) |
|
|
|
|
pfree(relation->rd_fdwroutine); |
|
|
|
|
if (relation->rd_indexcxt) |
|
|
|
@ -2551,7 +2554,9 @@ RelationClearRelation(Relation relation, bool rebuild) |
|
|
|
|
RelationCloseSmgr(relation); |
|
|
|
|
|
|
|
|
|
/* Free AM cached data, if any */ |
|
|
|
|
table_free_rd_amcache(relation); |
|
|
|
|
if (relation->rd_amcache) |
|
|
|
|
pfree(relation->rd_amcache); |
|
|
|
|
relation->rd_amcache = NULL; |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Treat nailed-in system relations separately, they always need to be |
|
|
|
|