Skip to content

Commit 059ac06

Browse files
committed
Remove some leftover code from multinode
1 parent e4eb666 commit 059ac06

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

src/planner/expand_hypertable.c

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ ts_plan_expand_hypertable_chunks(Hypertable *ht, PlannerInfo *root, RelOptInfo *
10681068
ts_add_baserel_cache_entry_for_chunk(chunks[i]->table_id, ht);
10691069
}
10701070

1071-
/* nothing to do here if we have no chunks and no data nodes */
1071+
/* nothing to do here if we have no chunks */
10721072
if (list_length(inh_oids) == 0)
10731073
return;
10741074

@@ -1092,10 +1092,8 @@ ts_plan_expand_hypertable_chunks(Hypertable *ht, PlannerInfo *root, RelOptInfo *
10921092

10931093
/* Open rel if needed */
10941094

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);
10991097

11001098
/* chunks cannot be temp tables */
11011099
Assert(!RELATION_IS_OTHER_TEMP(newrelation));
@@ -1166,15 +1164,6 @@ ts_plan_expand_hypertable_chunks(Hypertable *ht, PlannerInfo *root, RelOptInfo *
11661164
/* build_simple_rel will add the child to the relarray */
11671165
RelOptInfo *child_rel = build_simple_rel(root, child_rtindex, rel);
11681166

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-
11781167
/*
11791168
* Can't touch fdw_private for OSM chunks, it might be managed by the
11801169
* OSM extension, or, in the tests, by postgres_fdw.

0 commit comments

Comments
 (0)