mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-25 18:27:20 +02:00
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.
This commit is contained in:
parent
dd951dc34a
commit
171cae1579
@ -3419,7 +3419,7 @@ StorePartitionKey(Relation rel,
|
|||||||
|
|
||||||
/* Mark this relation as dependent on a few things as follows */
|
/* Mark this relation as dependent on a few things as follows */
|
||||||
myself.classId = RelationRelationId;
|
myself.classId = RelationRelationId;
|
||||||
myself.objectId = RelationGetRelid(rel);;
|
myself.objectId = RelationGetRelid(rel);
|
||||||
myself.objectSubId = 0;
|
myself.objectSubId = 0;
|
||||||
|
|
||||||
/* Operator class and collation per key column */
|
/* Operator class and collation per key column */
|
||||||
@ -3438,10 +3438,10 @@ StorePartitionKey(Relation rel,
|
|||||||
referenced.classId = CollationRelationId;
|
referenced.classId = CollationRelationId;
|
||||||
referenced.objectId = partcollation[i];
|
referenced.objectId = partcollation[i];
|
||||||
referenced.objectSubId = 0;
|
referenced.objectSubId = 0;
|
||||||
}
|
|
||||||
|
|
||||||
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
|
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Anything mentioned in the expressions. We must ignore the column
|
* Anything mentioned in the expressions. We must ignore the column
|
||||||
|
Loading…
Reference in New Issue
Block a user