On Fri, Jan 16, 2026 at 11:49 AM Richard Guo <[email protected]> wrote:
> Attached is a draft patch for the code changes.  It currently causes
> plan changes in 28 regression test queries, which is a surprisingly
> high number.  We'll have to go through these tests one by one, but
> before doing that, I would like to hear others' thoughts on this
> patch.

I went through those tests one by one, and AFAICS the plan changes are
all positive.

However, these plan changes resulted in a loss of coverage in tests
specifically designed to verify the planner's handling of PHVs.  So
I've modified the affected queries to force the preservation of PHVs
by changing the target expressions into forms that the new logic
considers "unsafe to strip".  Please see attached.

- Richard

Attachment: v3-0001-Remove-no-op-PlaceHolderVars.patch
Description: Binary data

Attachment: v3-0002-Fixing-test-cases.patch
Description: Binary data

Reply via email to