*** a/src/backend/optimizer/path/allpaths.c
--- b/src/backend/optimizer/path/allpaths.c
***************
*** 3457,3463 **** generate_partition_wise_join_paths(PlannerInfo *root, RelOptInfo *rel)
  		set_cheapest(child_rel);
  
  #ifdef OPTIMIZER_DEBUG
! 		debug_print_rel(root, rel);
  #endif
  
  		live_children = lappend(live_children, child_rel);
--- 3457,3463 ----
  		set_cheapest(child_rel);
  
  #ifdef OPTIMIZER_DEBUG
! 		debug_print_rel(root, child_rel);
  #endif
  
  		live_children = lappend(live_children, child_rel);
