Skip to content

Commit 445f1ac

Browse files
committed
heap_drop() should flush the relcache entry for the
relation being dropped.
1 parent 69cc16f commit 445f1ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/catalog/heap.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.127 2000/05/20 23:11:29 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.128 2000/05/25 21:25:32 tgl Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -1578,12 +1578,15 @@ heap_drop_with_catalog(const char *relname)
15781578
void
15791579
heap_drop(Relation rel)
15801580
{
1581+
Oid rid = RelationGetRelid(rel);
1582+
15811583
ReleaseRelationBuffers(rel);
15821584
if (!(rel->rd_isnoname) || !(rel->rd_unlinked))
15831585
smgrunlink(DEFAULT_SMGR, rel);
15841586
rel->rd_unlinked = TRUE;
15851587
heap_close(rel, NoLock);
15861588
RemoveFromNoNameRelList(rel);
1589+
RelationForgetRelation(rid);
15871590
}
15881591

15891592

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy