model-writtenrun 3194 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jeff Davis proposed making function-level SET search_path affordable through proconfig preprocessing, faster syntax validation, and a cache keyed by path string and role, reporting a reduction from 14.7 to 8.6 seconds for his test query #1.
- Isaac Morland proposed skipping redundant search-path changes for nested functions #2, while Jeff Davis and Nathan Bossart questioned the resulting performance cliffs and invalidation requirements #5 #8 #10; Isaac defended optimizing the common case #9.
- Nathan Bossart identified the risk of cached paths bypassing reconfigured namespace hooks and suggested sharing GUC transformation code #3; Jeff moved hook execution and deduplication after cache retrieval and shared the transformation routine in #6.
- Following Nathan Bossart's suggestions about parallel lists and hash_combine() #7, Jeff revised proconfig storage and reduced namespace-path allocations in #12, then added current-entry reuse and an experimental fast_set_search_path() bypass in #13.
- Nathan Bossart approved the proconfig and syntax-validation patches while requesting more scrutiny of the cache #14; the proconfig component of #13 landed with comment and formatting cleanup as 5765cfe18c.
- Jeff considered avoiding repeated validation instead of maintaining a separate identifier parser #15, but Robert Haas warned that bypassing the GUC stack could mishandle transaction and SET/LOCAL semantics #16; Jeff prioritized the cache and described allocator complications in the broader GUC redesign #17 #18.
- After the proconfig landing, Jeff resubmitted the remaining cache patch on a newer base #19, then refactored it into smaller helpers with OOM handling and bounded growth, accompanied by separate validation-cache and last-entry optimizations #21.
- The main cache component of #21 landed as f26c2368dc, with a smaller reset threshold and simplified OOM recovery that temporarily marked the cache invalid, as Jeff explained in #22.
- Jeff subsequently found additional potential OOM hazards and posted a fix that restored an independent list copy and simplified cache management, together with refreshed versions of the two remaining optimizations #23.
- The OOM fix from #23 landed with comment and formatting cleanup as 8efa301532, accepting a small performance cost for safer ownership of the active path.
- The validation-cache component of #23 landed as ad57c2a7c5, with a local use_cache boolean added; this avoided repeated parsing without introducing the originally proposed CheckIdentifierString() implementation.
- Jeff confirmed both landings and resubmitted last-entry reuse alongside an optional SH_STORE_HASH change, whose benefit he could not demonstrate #24.
- Last-entry reuse from #24 landed unchanged as a86c61c9ee; Jeff left SH_STORE_HASH uncommitted after collision-heavy testing still showed no benefit #25.
- Months later, Noah Misch reported that cached namespace ACL results also depend on role memberships and database ownership, requiring invalidations for pg_auth_members and pg_database #26.
- Jeff supplied the missing callbacks and renamed the invalidation function in #27; at the thread's last message, Noah confirmed that one role-membership syscache callback was sufficient, while the ancillary ACL_CREATE_TEMP question remained unresolved #28.
- The invalidation fix from #27 subsequently landed unchanged as d3e076549b and was backpatched to PostgreSQL 17, completing the reported correctness repair.