diff --git a/src/planner/expand_hypertable.c b/src/planner/expand_hypertable.c index 1e5671d8890..9c859acea34 100644 --- a/src/planner/expand_hypertable.c +++ b/src/planner/expand_hypertable.c @@ -1423,9 +1423,6 @@ ts_plan_expand_hypertable_chunks(Hypertable *ht, PlannerInfo *root, RelOptInfo * if(! hypertable_is_distributed(ht)) enable_partitionwise_aggregate = true; - // Fixme - enable_partition_pruning = false; - build_hypertable_partition_info(ht, root, rel, list_length(inh_oids)); } diff --git a/tsl/src/nodes/decompress_chunk/decompress_chunk.c b/tsl/src/nodes/decompress_chunk/decompress_chunk.c index 46afd056746..10caa637f92 100644 --- a/tsl/src/nodes/decompress_chunk/decompress_chunk.c +++ b/tsl/src/nodes/decompress_chunk/decompress_chunk.c @@ -883,6 +883,12 @@ ts_decompress_chunk_generate_paths(PlannerInfo *root, RelOptInfo *chunk_rel, Hyp continue; } + // Fix relid + RelOptInfo *newrel = palloc(sizeof(RelOptInfo)); + memcpy(newrel, info->chunk_rel, sizeof(RelOptInfo)); + newrel->relid = info->compressed_rel->relid; + path->parent = newrel; + path = (Path *) create_append_path_compat(root, chunk_rel, NIL,