model-writtenrun 1879 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Richard Guo proposed folding Var IS [NOT] NULL tests on nonnullable columns during constant folding in #1, while retaining the later reduction machinery because self-join elimination and outer-join simplification can create further opportunities.
- Richard noted that earlier folding could both remove and enable legal join orders in #2; Robert Haas considered that potentially manageable but challenged collecting optimization information during parsing in #3.
- Tom Lane showed that storing NOT NULL information while parsing a view could become incorrect after a constraint was dropped in #4, and Richard moved collection into the early planner in #7, also correcting the PlannerInfo passed when simplifying EXISTS subqueries.
- Richard polished the revised implementation in #8; Tender Wang questioned its zero-based bitmap description in #9, and David Rowley explained the attribute-number convention in #11, after which Richard retained the wording in #12.
- After Tom said he had not reviewed the revised patch in #13, Richard deferred committing in #14, and Robert's substantive review in #15 challenged the extra relation-open cycle and requested more coherent catalog collection.
- Richard argued in #16 and #20 for two collection phases: gather only information needed before constant folding and pull-up early, and defer statistics and other expensive data until RelOptInfo construction to avoid unnecessary work.
- Robert proposed combining inheritance checks, virtual-column expansion, and nullability collection in #21; Tom additionally required a relation-OID hash table instead of storing planner information in RangeTblEntry in #22.
- Richard implemented that redesign as three patches in #26: move virtual-column expansion before sublink pull-up, centralize early relation preprocessing, and collect NOT NULL attributes in a shared hash table for constant folding.
- Chengpeng Yan suggested separating virtual-column information collection from later expansion in #27, but Richard retained combined processing in #28 to avoid another rangetable pass and extra cached metadata, while preserving expansion before subquery pull-up.
- Tom questioned the cost of planner-side virtual-column expansion and suggested rewriter ownership in #30; Richard explained in #31 that outer joins and grouping sets require planner PlaceHolderVars, and confirmed the series targeted PostgreSQL 19 in #32.
- Following the May and June rebases in #32 and #33, Andrei Lepikhov proposed broader catalog caching in #34 and #36, but Richard kept the early cache narrowly scoped and suggested any broader caching belong in get_relation_info() in #39.
- Richard's final revision in #41 delayed EXISTS-subquery preprocessing until after rejection checks, avoiding unnecessary work while maintaining virtual-column expansion, and noted that separate NOT IN pull-up work depended on this infrastructure.
- Richard committed all three patches from #41 unchanged as e0d0529526, 904f6a593a, and e2debb6438, announcing the completed push in #43.
- Tomas Vondra asked whether the PostgreSQL 18 planning-performance open item was resolved in #44; Richard clarified in #45 that the changes were master-only, reported no measurable overhead in his simple experiment, and said the proposal to include the prerequisites in PostgreSQL 18 had lacked support.
- With no demonstrated performance regression or planned PostgreSQL 18 fix, Nathan Bossart closed that release's open item as Won't Fix in #49, following Richard's assessment in #48.
- Junwang Zhao identified inappropriate use of Relids for attribute-number sets and supplied a Bitmapset * cleanup in #51; Tender Wang supported it in #52, and Richard found one missed declaration in #53, which Junwang added in #54.
- Richard committed the corrected cleanup from #54 with only whitespace normalization as 2d756ebbe8 and confirmed completion in #55, leaving all submitted patches landed.
- The final message, #56, reports Soumya's separate experiments with nullability caches and asks whether to pursue those approaches or extend var_is_nonnullable(); the supplied thread contains no response or further patch.