aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-12-13 15:11:09 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2018-12-13 15:11:16 -0500
commit171cae1579124a400e234f89c1fc80f3caed5f68 (patch)
treef693c5e6dafb707bb3a882bc3ba3f91a270cf460
parentdd951dc34a2ecde28cd8d686cd06de1d21f474a0 (diff)
downloadpostgresql-171cae1579124a400e234f89c1fc80f3caed5f68.tar.gz
postgresql-171cae1579124a400e234f89c1fc80f3caed5f68.zip
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 2186b608b. Back-patch to v10 where that came in.
-rw-r--r--src/backend/catalog/heap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index a65f608c754..415194e0193 100644
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -3419,7 +3419,7 @@ StorePartitionKey(Relation rel,
/* Mark this relation as dependent on a few things as follows */
myself.classId = RelationRelationId;
- myself.objectId = RelationGetRelid(rel);;
+ myself.objectId = RelationGetRelid(rel);
myself.objectSubId = 0;
/* Operator class and collation per key column */
@@ -3438,9 +3438,9 @@ StorePartitionKey(Relation rel,
referenced.classId = CollationRelationId;
referenced.objectId = partcollation[i];
referenced.objectSubId = 0;
- }
- recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
+ recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
+ }
}
/*