aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/indexcmds.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index e9da06a9fa7..4448b986b62 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -2960,8 +2960,11 @@ ReindexRelationConcurrently(Oid relationOid, int options)
indexId,
concurrentName);
- /* Now open the relation of the new index, a lock is also needed on it */
- newIndexRel = index_open(indexId, ShareUpdateExclusiveLock);
+ /*
+ * Now open the relation of the new index, a session-level lock is
+ * also needed on it.
+ */
+ newIndexRel = index_open(newIndexId, ShareUpdateExclusiveLock);
/*
* Save the list of OIDs and locks in private context