diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-09-02 04:07:18 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-09-02 04:07:18 +0000 |
commit | aa291955a84fa4650482ac16748e85ed98cba827 (patch) | |
tree | 7182a94dfd0ad81df9a982de96471b51c01fdb32 /src/backend/utils/cache/relcache.c | |
parent | 632b56946bc41727f14f70a7731e4c54233ca2e3 (diff) |
I'm gonna stick my neck out a little and back-patch these
changes into REL6_5 ... they could use some more testing before we release
6.5.2, though.
Diffstat (limited to 'src/backend/utils/cache/relcache.c')
-rw-r--r-- | src/backend/utils/cache/relcache.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 1c20d9963a9..6286003c252 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.62.2.1 1999/08/02 05:25:01 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.62.2.2 1999/09/02 04:07:18 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1256,9 +1256,13 @@ RelationFlushRelation(Relation *relationPtr, if (!onlyFlushReferenceCountZero || RelationHasReferenceCountZero(relation)) { - oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt); + /* make sure smgr and lower levels close the relation's files, + * if they weren't closed already + */ + smgrclose(DEFAULT_SMGR, relation); + RelationCacheDelete(relation); FreeTupleDesc(relation->rd_att); @@ -1515,17 +1519,6 @@ RelationPurgeLocalRelation(bool xactCommitted) else smgrunlink(DEFAULT_SMGR, reln); } - else if (!IsBootstrapProcessingMode() && !(reln->rd_isnoname)) - - /* - * RelationFlushRelation () below will flush relation - * information from the cache. We must call smgrclose to flush - * relation information from SMGR & FMGR, too. We assume that - * for temp relations smgrunlink is already called by - * heap_destroyr and we skip smgrclose for them. - - * vadim 05/22/97 - */ - smgrclose(DEFAULT_SMGR, reln); reln->rd_myxactonly = FALSE; |