model-writtenrun 4247 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun - Sep 2021 · 4 entries
- Amit Langote opened the thread with #1, proposing a bitmap of range-table indexes requiring permission checks to avoid scanning thousands of partition entries during executor startup.
- Tom Lane argued in #5 for separating permission data from range-table entries entirely, both to make omissions visible to the compiler and potentially reduce nested-view planning overhead; Amit implemented separate RelPermissionInfo nodes in #9.
- Amit added a companion patch removing dummy OLD/NEW view entries in #10, then reported in #11 that permission-list merging alone slowed the nested-view benchmark while removing the dummy entries improved it.
- Alvaro Herrera objected to repeated linear OID searches in #12, prompting #13 to add perminfoindex links in RangeTblEntry and simplify permission-list flattening.
Dec 2021 - Jan 2022 · 1 entry
- The series survived several rebases and missing expected-output fixes before Zhihong Yu's review in #18 and David Rowley's detailed review in #23 led to clearer userid handling, serialization corrections, and consistent OID-based permission merging in #24.
Jul 2022 - Feb 2023 · 23 entries
- After further maintenance and the move into the next development cycle, Amit refreshed the patches for generated node support in #30 and #31.
- Tom demonstrated in #32 that merging permission records by table OID could combine different users and column privileges incorrectly; #34 therefore switched to one RTEPermissionInfo per relevant range-table entry and retained the range table as an argument to the changed hook.
- Andres Freund reported serialization failures and incorrect generated-column values in #35, and Amit restored extraUpdatedCols read/write support in #36.
- Tom's discussion of moving extraUpdatedCols out of parser structures in #38 led Amit to extend #40 with planner-generated per-result-relation bitmaps and Bitmapset node support.
- The new Bitmapset work required Meson and serialization repairs through #44, including replacement of the accidentally repeated attachments in #43.
- Peter Eisentraut endorsed Bitmapset node tags as independently useful in #45, while Tom objected in #52 to optionally tagged bitmapsets and a bulkier dump format; Amit accepted those design concerns in #53.
- Alvaro's review and small patches in #50, followed by the fuller fixup stack in #54, focused on keeping permission indexes synchronized and combining range tables and permission lists through one API.
- Amit integrated that feedback in #55, coupling flattened permission entries to RTE insertion and introducing CombineRangeTables(); he also narrowed the view companion to removing only NEW because OLD still served locking and permission-checking purposes.
- The next revision, #57, simplified rewriteRuleAction() and included an AclMode prerequisite, while #58 reported that the prerequisite had landed and deferred the remaining view-entry and extraUpdatedCols features.
- Alvaro separately committed the missing_ok attribute-mapping subset of #57 as ad86d159b6, preserving its implementation while separating unrelated caller adaptations from the main permission change.
- Amit split two more prerequisites out in #59, integrated Alvaro's fixups, and added a rules.sql test for permission-check order that earlier flattening implementations mishandled.
- Alvaro committed the checkAsUser prerequisite from #59 as 599b33b949, adding OidIsValid() checks and comment edits while retaining the ForeignScan and RelOptInfo userid approach.
- Amit supplied a separate permission-info copying fix in #61, while Alvaro proposed in #63 reusing the existing tuple-conversion map instead of maintaining a second root-to-child map.
- The revised mapping prerequisite in #66 landed as fb958b5da8, with Alvaro renaming and relocating the ResultRelInfo fields as described in #67.
- The remaining permission patch progressed through helper relocation in #68 and a rebase in #69, then landed as a61b1f7482 with the original hook name retained, an unnecessary executor wrapper removed, and the CombineRangeTables() API revised.
- Alvaro requested in #70 that the deferred view-entry and extraUpdatedCols patches move to new threads; Amit accepted in #71, leaving those features outside this thread's main landing.
- Amit noticed an outdated ApplyRetrieveRule() comment after the landing and supplied #72, which was committed unchanged as 29861e228a.
- Justin Pryzby's question about repeated userid computation in #76 prompted #77, which removed redundant assignments and separately fixed inheritance children incorrectly copying a UNION ALL subquery parent's invalid userid.
- Amit added attempted core regression coverage in #79, but Alvaro showed in #83 that it passed without the fix and proposed computing userid once at the enclosing scope.
- Amit integrated that cleanup and rewrote the attempted test in #84; the cleanup component landed unchanged as 438e6b7240, while the userid bugfix remained pending.
- Justin reported two sqlsmith failures in #86; Tom connected them to an existing diagnosis in #88 and committed Tender Wang's recursion-context repair with regression coverage as c7468c73f7, without an attached patch in this thread.
- Alvaro rewrote the pending userid condition around reloptkind in #90, and Amit removed the ineffective core test in #92; that fix landed with only comment rewrapping as a316a3bc6d.
- After discussion of using extension tests in #93 and #94, Amit supplied #95, using postgres_fdw user mappings and remote estimation to expose the userid bug reliably.
Jun 2023 · 2 entries
- Amit refreshed the test's comments and commit explanation in #96, then committed its unchanged test diff on master as 054ff3b33a and on PostgreSQL 16 as 0a14bca662; the candidate list contains both hashes for this single change.
- The final message, #97, confirms the test landing and closes its commitfest entry, leaving the main permission optimization and its reported follow-up fixes committed, with the previously deferred companion features outside this thread.