model-writtenrun 3587 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that Boolean IS NOT TRUE queries on RANGE-partitioned tables failed with an invalid strategy error in #1; Tom Lane traced the failure to LIST-specific inequality handling and identified the incorrect treatment of NULLs in #2.
- David Rowley first proposed retaining NULL partitions in #3, then attached an experimental workaround in #4 that disabled Boolean IS NOT pruning for RANGE and HASH while retaining NULL partitions for LIST, acknowledging that it would also weaken pruning for ordinary inequalities.
- David replaced that workaround in #5 by expanding Boolean IS NOT tests into the opposite Boolean test OR IS NULL and recursively generating pruning steps; Tom endorsed this approach in #6 and explained that possible IS UNKNOWN support could use ordinary nullness tests.
- David added LIST and RANGE regression tests and reported manual HASH testing in #7, while leaving additional NULL-partition pruning improvements outside the fix; Amit Langote confirmed a related limitation involving later RANGE partition keys in #9.
- Tender Wang identified a compiler warning and supplied the required pointer cast in #8; David committed #7 with that cast and formatting changes as 4c2369ac5d, with backpatches through PostgreSQL 12.
- After the main fix landed, Alexander identified an inaccurate range-pruning comment in #10; David combined that correction with the unnecessary partition-key checks he had noticed in #4, posting a separate master-only cleanup in #11.
- David committed the cleanup from #11 unchanged as d2ca9a50b5 and confirmed the push in #12, leaving both fixes landed while the discussed pruning enhancements remained outside these patches.