File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -755,6 +755,18 @@ fill_prel_with_partitions(PartRelationInfo *prel,
755
755
switch (prel -> parttype )
756
756
{
757
918A
td>757
case PT_HASH :
758
+ /*
759
+ * This might be the case if hash part was dropped, and thus
760
+ * children array alloc'ed smaller than needed, but parts
761
+ * bound cache still keeps entries with high indexes.
762
+ */
763
+ if (pbin -> part_idx >= PrelChildrenCount (prel ))
764
+ ereport (ERROR , (errmsg ("pg_pathman's cache for relation \"%s\" "
765
+ "has not been properly initialized. "
766
+ "Looks like one of hash partitions was dropped." ,
767
+ get_rel_name_or_relid (PrelParentRelid (prel ))),
768
+ errhint (INIT_ERROR_HINT )));
769
+
758
770
prel -> children [pbin -> part_idx ] = pbin -> child_relid ;
759
771
break ;
760
772
You can’t perform that action at this time.
0 commit comments