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

Commit9eb80f2

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 parent663c68f commit9eb80f2

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
@@ -1464,6 +1464,8 @@ index_drop(Oid indexId, bool concurrent)
14641464
* conflicts with existing predicate locks, so now is the time to move
14651465
* them to the heap relation.
14661466
*/
1467+
userHeapRelation=heap_open(heapId,ShareUpdateExclusiveLock);
1468+
userIndexRelation=index_open(indexId,ShareUpdateExclusiveLock);
14671469
TransferPredicateLocksToHeapRelation(userIndexRelation);
14681470

14691471
/*
@@ -1473,9 +1475,6 @@ index_drop(Oid indexId, bool concurrent)
14731475
*/
14741476
indexRelation=heap_open(IndexRelationId,RowExclusiveLock);
14751477

1476-
userHeapRelation=heap_open(heapId,ShareUpdateExclusiveLock);
1477-
userIndexRelation=index_open(indexId,ShareUpdateExclusiveLock);
1478-
14791478
tuple=SearchSysCacheCopy1(INDEXRELID,
14801479
ObjectIdGetDatum(indexId));
14811480
if (!HeapTupleIsValid(tuple))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp