Extending Self-Join Elimination to partitioned tables - Mailing list pgsql-hackers

From Trương Hoàng Quân
Subject Extending Self-Join Elimination to partitioned tables
Date
Msg-id CAGJgb9u9jzXX7fOv5Uc0BfbmrVtTcsSRhG1T+UUWLhcwruDi5A@mail.gmail.com
Whole thread
List pgsql-hackers
Hi hackers,

Please find attached a patch that extends Self-Join Elimination to
partitioned tables. The original SJE commit called this out as future
work, since eliminating redundant self-joins before partition expansion
can be a significant win.

This patch is mostly tests at this point. So far the behavior looks
correct to me and I haven't found any cases where it produces a wrong
plan or wrong results, so I've focused on building out regression tests
covering the cases I could come up with.

I'd appreciate any feedback. If anyone has objections, or can think of a
query pattern where this would break (wrong results, crashes, planner
assertions), please let me know. In the meantime I'll keep expanding the
test coverage for the corner cases I can think of.

Regards,
Quan Truong
Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Reduce cleanup lock contention on standby replay
Next
From: Noah Misch
Date:
Subject: Re: postgres_fdw could deparse ArrayCoerceExpr