Skip to content

Commit 84d5148

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 04fe805 commit 84d5148

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/catalog/heap.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -3413,7 +3413,7 @@ StorePartitionKey(Relation rel,
34133413

34143414
/* Mark this relation as dependent on a few things as follows */
34153415
myself.classId = RelationRelationId;
3416-
myself.objectId = RelationGetRelid(rel);;
3416+
myself.objectId = RelationGetRelid(rel);
34173417
myself.objectSubId = 0;
34183418

34193419
/* Operator class and collation per key column */
@@ -3432,9 +3432,9 @@ StorePartitionKey(Relation rel,
34323432
referenced.classId = CollationRelationId;
34333433
referenced.objectId = partcollation[i];
34343434
referenced.objectSubId = 0;
3435-
}
34363435

3437-
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
3436+
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
3437+
}
34383438
}
34393439

34403440
/*

0 commit comments

Comments
 (0)