Change comments of removing useless joins.
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t49007psql -h localhost -U postgresBuilt from patchset v1 (message #1), August 17, 2026 at 10:04 AM.
After reading the logic of removing useless join, I think the comment of
this might need to be changed: "Currently, join_is_removable only succeeds
if sjinfo's right hand is a single baserel. " could be changed to
"Currently, join_is_removable only succeeds if sjinfo's min_righthand is a
single baserel. ". Because the useless join in the query "select t1.* from
t1 left join (t2 left join t3 on t3.a=t2.b) on t2.a=t1.a;" would also be
eliminated. That is, the query will be converted to "select t1.* from t1;"