Skip to content

Commit 8b90174

Browse files
committed
Fix bogus logic for skipping unnecessary partcollation dependencies.
The idea here is to not call recordDependencyOn for the default collation, since we know that's pinned. But what the code actually did was to record the partition key's dependency on the opclass twice, instead. Evidently introduced by sloppy coding in commit 2186b60. Back-patch to v10 where that came in.
1 parent a0696d2 commit 8b90174

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/catalog/heap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3145,7 +3145,7 @@ StorePartitionKey(Relation rel,
31453145

31463146
/* Mark this relation as dependent on a few things as follows */
31473147
myself.classId = RelationRelationId;
3148-
myself.objectId = RelationGetRelid(rel);;
3148+
myself.objectId = RelationGetRelid(rel);
31493149
myself.objectSubId = 0;
31503150

31513151
/* Operator class and collation per key column */
@@ -3164,9 +3164,9 @@ StorePartitionKey(Relation rel,
31643164
referenced.classId = CollationRelationId;
31653165
referenced.objectId = partcollation[i];
31663166
referenced.objectSubId = 0;
3167-
}
31683167

3169-
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
3168+
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
3169+
}
31703170
}
31713171

31723172
/*

0 commit comments

Comments
 (0)