File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -3858,13 +3858,20 @@ RelationCacheInitializePhase3(void)
3858
3858
}
3859
3859
3860
3860
/*
3861
- * Reload partition key and descriptor for a partitioned table.
3861
+ * Reload the partition key and descriptor for a partitioned table.
3862
3862
*/
3863
- if (relation -> rd_rel -> relkind == RELKIND_PARTITIONED_TABLE )
3863
+ if (relation -> rd_rel -> relkind == RELKIND_PARTITIONED_TABLE &&
3864
+ relation -> rd_partkey == NULL )
3864
3865
{
3865
3866
RelationBuildPartitionKey (relation );
3866
3867
Assert (relation -> rd_partkey != NULL );
3867
3868
3869
+ restart = true;
3870
+ }
3871
+
3872
+ if (relation -> rd_rel -> relkind == RELKIND_PARTITIONED_TABLE &&
3873
+ relation -> rd_partdesc == NULL )
3874
+ {
3868
3875
RelationBuildPartitionDesc (relation );
3869
3876
Assert (relation -> rd_partdesc != NULL );
3870
3877
You can’t perform that action at this time.
0 commit comments