Skip to content

Commit b10edaf

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 8585718 commit b10edaf

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
@@ -11502,12 +11502,12 @@ ATExecDropInherit(Relation rel, RangeVar *parent, LOCKMODE lockmode)
1150211502
/* Off to RemoveInheritance() where most of the work happens */
1150311503
RemoveInheritance(rel, parent_rel);
1150411504

11505-
/* keep our lock on the parent relation until commit */
11506-
heap_close(parent_rel, NoLock);
11507-
1150811505
ObjectAddressSet(address, RelationRelationId,
1150911506
RelationGetRelid(parent_rel));
1151011507

11508+
/* keep our lock on the parent relation until commit */
11509+
heap_close(parent_rel, NoLock);
11510+
1151111511
return address;
1151211512
}
1151311513

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