Skip to content

Commit bdc643e

Browse files
committed
Fix access to just-closed relcache entry.
It might be impossible for this to cause a problem in non-debug builds, since there'd be no opportunity for the relcache entry to get recycled before the fetch. It blows up nicely with -DRELCACHE_FORCE_RELEASE plus valgrind, though. Evidently introduced by careless refactoring in commit f0e4475. Back-patch accordingly. Discussion: https://postgr.es/m/27543.1528758304@sss.pgh.pa.us
1 parent f8795d2 commit bdc643e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/commands/tablecmds.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11922,12 +11922,12 @@ ATExecDropInherit(Relation rel, RangeVar *parent, LOCKMODE lockmode)
1192211922
/* Off to RemoveInheritance() where most of the work happens */
1192311923
RemoveInheritance(rel, parent_rel);
1192411924

11925-
/* keep our lock on the parent relation until commit */
11926-
heap_close(parent_rel, NoLock);
11927-
1192811925
ObjectAddressSet(address, RelationRelationId,
1192911926
RelationGetRelid(parent_rel));
1193011927

11928+
/* keep our lock on the parent relation until commit */
11929+
heap_close(parent_rel, NoLock);
11930+
1193111931
return address;
1193211932
}
1193311933

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