We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e176281 commit 622c822Copy full SHA for 622c822
src/backend/utils/cache/relcache.c
@@ -3858,13 +3858,20 @@ RelationCacheInitializePhase3(void)
3858
}
3859
3860
/*
3861
- * Reload partition key and descriptor for a partitioned table.
+ * Reload the partition key and descriptor for a partitioned table.
3862
*/
3863
- if (relation->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
+ if (relation->rd_rel->relkind == RELKIND_PARTITIONED_TABLE &&
3864
+ relation->rd_partkey == NULL)
3865
{
3866
RelationBuildPartitionKey(relation);
3867
Assert(relation->rd_partkey != NULL);
3868
3869
+ restart = true;
3870
+ }
3871
+
3872
3873
+ relation->rd_partdesc == NULL)
3874
+ {
3875
RelationBuildPartitionDesc(relation);
3876
Assert(relation->rd_partdesc != NULL);
3877
0 commit comments