model-writtenrun 6146 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Cándido Antonio Martínez Descalzo reported that PostgreSQL 18 stopped pruning partitions for a query combining a view and grouping sets, supplying reproductions and query rewrites that restored pruning in #1.
- David Rowley traced the regression to PlaceHolderVars obscuring partition-key columns and proposed reusing the existing index-matching treatment for non-nullable placeholders in #2.
- Richard Guo agreed that these placeholders are safe to strip in scan-level expressions and supplied the implementation and regression tests in #3, proposing backpatching only to PostgreSQL 18 because older versions lacked field reports despite having related cases.
- Richard supplied formal HEAD and PostgreSQL 18 variants in #4, preserving the old exported function as a thin wrapper on PostgreSQL 18 to protect extensions while sharing the new utility between index matching and partition pruning.
- Richard committed the HEAD variant from #4 as c1408956e3 and backpatched the fix to PostgreSQL 18, confirming in #5 that both patches landed as-is with the compatibility precaution retained.