@@ -1068,7 +1068,7 @@ ts_plan_expand_hypertable_chunks(Hypertable *ht, PlannerInfo *root, RelOptInfo *
1068
1068
ts_add_baserel_cache_entry_for_chunk (chunks [i ]-> table_id , ht );
1069
1069
}
1070
1070
1071
- /* nothing to do here if we have no chunks and no data nodes */
1071
+ /* nothing to do here if we have no chunks */
1072
1072
if (list_length (inh_oids ) == 0 )
1073
1073
return ;
1074
1074
@@ -1092,10 +1092,8 @@ ts_plan_expand_hypertable_chunks(Hypertable *ht, PlannerInfo *root, RelOptInfo *
1092
1092
1093
1093
/* Open rel if needed */
1094
1094
1095
- if (child_oid != parent_oid )
1096
- newrelation = table_open (child_oid , chunk_lock );
1097
- else
1098
- newrelation = oldrelation ;
1095
+ Assert (child_oid != parent_oid );
1096
+ newrelation = table_open (child_oid , chunk_lock );
1099
1097
1100
1098
/* chunks cannot be temp tables */
1101
1099
Assert (!RELATION_IS_OTHER_TEMP (newrelation ));
@@ -1166,15 +1164,6 @@ ts_plan_expand_hypertable_chunks(Hypertable *ht, PlannerInfo *root, RelOptInfo *
1166
1164
/* build_simple_rel will add the child to the relarray */
1167
1165
RelOptInfo * child_rel = build_simple_rel (root , child_rtindex , rel );
1168
1166
1169
- /* if we're performing partitionwise aggregation, we must populate part_rels */
1170
- if (rel -> part_rels != NULL )
1171
- {
1172
- rel -> part_rels [i ] = child_rel ;
1173
- #if PG15_GE
1174
- rel -> live_parts = bms_add_member (rel -> live_parts , i );
1175
- #endif
1176
- }
1177
-
1178
1167
/*
1179
1168
* Can't touch fdw_private for OSM chunks, it might be managed by the
1180
1169
* OSM extension, or, in the tests, by postgres_fdw.
0 commit comments