mirror of
https://github.com/postgres/postgres.git
synced 2025-05-20 00:03:14 -04:00
heap_drop() should flush the relcache entry for the
relation being dropped.
This commit is contained in:
parent
69cc16f47e
commit
445f1acf7a
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* INTERFACE ROUTINES
|
||||||
@ -1578,12 +1578,15 @@ heap_drop_with_catalog(const char *relname)
|
|||||||
void
|
void
|
||||||
heap_drop(Relation rel)
|
heap_drop(Relation rel)
|
||||||
{
|
{
|
||||||
|
Oid rid = RelationGetRelid(rel);
|
||||||
|
|
||||||
ReleaseRelationBuffers(rel);
|
ReleaseRelationBuffers(rel);
|
||||||
if (!(rel->rd_isnoname) || !(rel->rd_unlinked))
|
if (!(rel->rd_isnoname) || !(rel->rd_unlinked))
|
||||||
smgrunlink(DEFAULT_SMGR, rel);
|
smgrunlink(DEFAULT_SMGR, rel);
|
||||||
rel->rd_unlinked = TRUE;
|
rel->rd_unlinked = TRUE;
|
||||||
heap_close(rel, NoLock);
|
heap_close(rel, NoLock);
|
||||||
RemoveFromNoNameRelList(rel);
|
RemoveFromNoNameRelList(rel);
|
||||||
|
RelationForgetRelation(rid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user