On Wed, Apr 15, 2026 at 6:30 AM Tender Wang <tndrwang@gmail.com> wrote:
> In the plan_showdown phase, in pgpa_qf_add_plan_rtis(), we can add 7,
> 5, and 3 to qf->relids.
> It seems difficult to add "6" to qf->relids when walking through the
> plan tree.(Maybe have an easy way, I don't know too much
> pg_plan_advice related code).
Thanks for looking through this. sj_unique_rtis is actually not set
from the plan tree walk, but based on the calls to
pgpa_join_path_setup that occur during planning, so it makes sense
that the join RTI crept in there. I'm guessing that this is another
place that needs a call to pgpa_filter_out_join_relids -- I've had a
few of those bugs already.
--
Robert Haas
EDB: http://www.enterprisedb.com