aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeBitmapAnd.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-07-21 12:00:14 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-07-21 12:00:14 -0400
commit3c90dcd039149716454378bd270673f781b5c19f (patch)
treeea4433d0b5343ef68261f946004e212c12d42c60 /src/backend/executor/nodeBitmapAnd.c
parent7c7412cae3ea8f8accdec1022969a9360b74f253 (diff)
downloadpostgresql-3c90dcd039149716454378bd270673f781b5c19f.tar.gz
postgresql-3c90dcd039149716454378bd270673f781b5c19f.zip
Fix calculation of relid sets for partitionwise child joins.
Applying add_outer_joins_to_relids() to a child join doesn't actually work, even if we've built a SpecialJoinInfo specialized to the child, because that function will also compare the join's relids to elements of the main join_info_list, which only deal in regular relids not child relids. This mistake escaped detection by the existing partitionwise join tests because they didn't test any cases where add_outer_joins_to_relids() needs to add additional OJ relids (that is, any cases where join reordering per identity 3 is possible). Instead, let's apply adjust_child_relids() to the relids of the parent join. This requires minor code reordering to collect the relevant AppendRelInfo structures first, but that's work we'd do shortly anyway. Report and fix by Richard Guo; cosmetic changes by me Discussion: https://postgr.es/m/CAMbWs49NCNbyubZWgci3o=_OTY=snCfAPtMnM-32f3mm-K-Ckw@mail.gmail.com
Diffstat (limited to 'src/backend/executor/nodeBitmapAnd.c')
0 files changed, 0 insertions, 0 deletions