So in this patch, the input restrictlist is modified to include the clauses generated by generate_join_implied_equalities_for_all. That doesn't seem okay -- doesn't it affect downstream usage of the restrictlist in the caller of set_joinrel_size_estimates?
I wonder if it's possible to do this by using the ECs directly in have_partkey_equi_join instead of using them to create fake join clauses. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services