model-writtenrun 8971 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane traced poor plans to statistics-access restrictions introduced by CVE-2017-7484 and proposed both marking safe btree comparison functions leakproof and checking parent-table permissions for child statistics in #1.
- Tom implemented the leakproof markings in 39a96512b3 without posting an attachment, then explained in #4 that forcing another initdb for PostgreSQL 11 was not worthwhile and that parent-permission handling remained the underlying problem.
- Peter Eisentraut highlighted inherited versus child-local columns and expression-index complications in #5; Amit Langote and Tom subsequently favored checking the table named in the query, with child-permission fallback for unmappable columns, in #7 and #8.
- Dilip Kumar proposed either walking inheritance ancestry or storing a parent identifier in #9, and Amit favored storing the root identifier to avoid repeated list scans in #10.
- Dilip supplied the initial root-permission implementation in #11 and added attribute-name translation in #12; Amit replaced that lookup with AppendRelInfo mapping and supplied a separate root-field preparation patch in #13, then repackaged both patches with Dilip's authorship credit in #15.
- After an eight-month gap, Amit reconsidered the work against newer inheritance-planning code in #18 and posted a combined, rebased patch in #20, still without a regression test.
- Tom's review in #23 exposed incorrect handling of multilevel partitioning, questioned the root-field layout and unmappable-column assertion, and proposed testing plan differences; Amit addressed these points and added a test in #24, then removed a redundant root check after Dilip's review in #27 and #28.
- Dilip suggested checking intermediate ancestors in #25, but Tom rejected that behavior and proposed accepting either child or query-root permissions, checking the child first to preserve existing behavior and avoid unnecessary mapping, in #30; Amit implemented that policy in #31.
- Alvaro Herrera reported a compiler warning in #32, and Amit initialized the mapping-result flag in #33.
- Tom found that the regression test passed without the fix and lacked expression-index coverage in #34; Amit explained that intervening leakproof markings had weakened the test, replaced it with regex cases, and fixed a newly exposed expression-index permission bug in #35.
- Tom removed the new RelOptInfo field in #36, using append_rel_array traversal instead because the field's definition was too specialized and prevented backpatching; the replacement supported PostgreSQL 11 and later.
- Tom committed #36 as 553d2ec271 with unchanged implementation code and expanded permission tests, backpatching through PostgreSQL 11; older releases remained unfixed because they lacked append_rel_array, and exact expression-index column permission analysis was left for future work.
- Amit accepted the simplification and thanked Tom for committing in #37, closing the thread with both changes landed and no attached work still awaiting review.