diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-02-08 05:53:55 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-02-08 05:53:55 +0000 |
commit | 9a75803b1a4ba01c1e02284146fa7cf8a0cf8cd1 (patch) | |
tree | ed4cfb7a33d80d0ea5662aa9ac4f05301f0698e4 /src/backend/utils/cache/relcache.c | |
parent | 68446b2c87a2aee5d8c2eb2aade7bb6d4195b7e1 (diff) | |
download | postgresql-9a75803b1a4ba01c1e02284146fa7cf8a0cf8cd1.tar.gz postgresql-9a75803b1a4ba01c1e02284146fa7cf8a0cf8cd1.zip |
Remove CatalogCacheFlushRelation, and the reloidattr infrastructure that was
needed by nothing else.
The restructuring I just finished doing on cache management exposed to me how
silly this routine was. Its function was to go into the catcache and blow
away all entries related to a given relation when there was a relcache flush
on that relation. However, there is no point in removing a catcache entry
if the catalog row it represents is still valid --- and if it isn't valid,
there must have been a catcache entry flush on it, because that's triggered
directly by heap_update or heap_delete on the catalog row. So this routine
accomplished nothing except to blow away valid cache entries that we'd very
likely be wanting in the near future to help reconstruct the relcache entry.
Dumb.
On top of which, it required a subtle and easy-to-get-wrong attribute in
syscache definitions, ie, the column containing the OID of the related
relation if any. Removing that is a very useful maintenance simplification.
Diffstat (limited to 'src/backend/utils/cache/relcache.c')
-rw-r--r-- | src/backend/utils/cache/relcache.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index ff85195ed13..6137b096772 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.303 2010/02/07 20:48:10 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.304 2010/02/08 05:53:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1917,13 +1917,6 @@ RelationClearRelation(Relation relation, bool rebuild) relation->rd_isvalid = false; /* - * Clear out catcache's entries for this relation. This is a bit of - * a hack, but it's a convenient place to do it. (XXX do we really - * still need this?) - */ - CatalogCacheFlushRelation(RelationGetRelid(relation)); - - /* * If we're really done with the relcache entry, blow it away. But if * someone is still using it, reconstruct the whole deal without moving * the physical RelationData record (so that the someone's pointer is @@ -2468,8 +2461,6 @@ RelationBuildLocalRelation(const char *relname, * * XXX this list had better match the relations specially handled in * RelationCacheInitializePhase2/3. - * - * XXX do we need this at all?? */ switch (relid) { |