Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4ee5c40

Browse files
committed
Don't try to use a unopened relation
Commit4c9d090 mistakenly introduced a call toTransferPredicateLocksToHeapRelation() on an index relation that hadbeen closed a few lines above. Moving up an index_open() call that'sbelow is enough to fix the problem.Discovered by me while testing an unrelated patch.
1 parentc90dcd6 commit4ee5c40

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎src/backend/catalog/index.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,8 @@ index_drop(Oid indexId, bool concurrent)
14751475
* conflicts with existing predicate locks, so now is the time to move
14761476
* them to the heap relation.
14771477
*/
1478+
userHeapRelation=heap_open(heapId,ShareUpdateExclusiveLock);
1479+
userIndexRelation=index_open(indexId,ShareUpdateExclusiveLock);
14781480
TransferPredicateLocksToHeapRelation(userIndexRelation);
14791481

14801482
/*
@@ -1484,9 +1486,6 @@ index_drop(Oid indexId, bool concurrent)
14841486
*/
14851487
indexRelation=heap_open(IndexRelationId,RowExclusiveLock);
14861488

1487-
userHeapRelation=heap_open(heapId,ShareUpdateExclusiveLock);
1488-
userIndexRelation=index_open(indexId,ShareUpdateExclusiveLock);
1489-
14901489
tuple=SearchSysCacheCopy1(INDEXRELID,
14911490
ObjectIdGetDatum(indexId));
14921491
if (!HeapTupleIsValid(tuple))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp