diff options
Diffstat (limited to 'src/backend/utils/cache/partcache.c')
-rw-r--r-- | src/backend/utils/cache/partcache.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/utils/cache/partcache.c b/src/backend/utils/cache/partcache.c index 331c0f24754..a22b84e6f3b 100644 --- a/src/backend/utils/cache/partcache.c +++ b/src/backend/utils/cache/partcache.c @@ -622,6 +622,7 @@ RelationBuildPartitionDesc(Relation rel) /* Moduli are stored in ascending order */ int greatest_modulus = hbounds[ndatums - 1]->modulus; + boundinfo->nindexes = greatest_modulus; boundinfo->indexes = (int *) palloc(greatest_modulus * sizeof(int)); @@ -655,6 +656,7 @@ RelationBuildPartitionDesc(Relation rel) case PARTITION_STRATEGY_LIST: { + boundinfo->nindexes = ndatums; boundinfo->indexes = (int *) palloc(ndatums * sizeof(int)); /* @@ -719,6 +721,7 @@ RelationBuildPartitionDesc(Relation rel) boundinfo->kind = (PartitionRangeDatumKind **) palloc(ndatums * sizeof(PartitionRangeDatumKind *)); + boundinfo->nindexes = ndatums + 1; boundinfo->indexes = (int *) palloc((ndatums + 1) * sizeof(int)); |