Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 171cae1

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 dd951dc commit 171cae1

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
@@ -3419,7 +3419,7 @@ StorePartitionKey(Relation rel,
34193419

34203420
/* Mark this relation as dependent on a few things as follows */
34213421
myself.classId = RelationRelationId;
3422-
myself.objectId = RelationGetRelid(rel);;
3422+
myself.objectId = RelationGetRelid(rel);
34233423
myself.objectSubId = 0;
34243424

34253425
/* Operator class and collation per key column */
@@ -3438,9 +3438,9 @@ StorePartitionKey(Relation rel,
34383438
referenced.classId = CollationRelationId;
34393439
referenced.objectId = partcollation[i];
34403440
referenced.objectSubId = 0;
3441-
}
34423441

3443-
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
3442+
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
3443+
}
34443444
}
34453445

34463446
/*

0 commit comments

Comments
 (0)