heap_drop() should flush the relcache entry for the

relation being dropped.
This commit is contained in:
Tom Lane 2000-05-25 21:25:32 +00:00
parent 69cc16f47e
commit 445f1acf7a
1 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.127 2000/05/20 23:11:29 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.128 2000/05/25 21:25:32 tgl Exp $
*
*
* INTERFACE ROUTINES
@ -1578,12 +1578,15 @@ heap_drop_with_catalog(const char *relname)
void
heap_drop(Relation rel)
{
Oid rid = RelationGetRelid(rel);
ReleaseRelationBuffers(rel);
if (!(rel->rd_isnoname) || !(rel->rd_unlinked))
smgrunlink(DEFAULT_SMGR, rel);
rel->rd_unlinked = TRUE;
heap_close(rel, NoLock);
RemoveFromNoNameRelList(rel);
RelationForgetRelation(rid);
}