model-writtenrun 7273 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun - Aug 2022 · 18 entries
- Andres Freund opened the thread after Mark Callaghan's regression report led him to oversized ExprEvalStep state: hashed-array evaluation had exceeded the intended cache-line size, and SQL/JSON enlarged it much further; he proposed moving JSON state out of line and avoiding an ABI change in released PostgreSQL 14 #1.
- Tom Lane supported enforcing the size limit with a static assertion, while Andres identified additional problems with embedded FmgrInfo, per-type coercion state and recursive ExprState evaluation #2 #3.
- David Rowley supplied a patch removing four cached hashed-array pointers and reported no performance loss from the additional indirection; James Coleman considered that first patch reasonable #4 #12.
- Andres supplied an alternative that relocated hash-call state into the hash table and reported that fixing JSON state size removed most of a measured 7–10% regression, although his first JSON attachment accidentally omitted almost all its changes #7 #19.
- Andres traced the remaining slowdown to repeated timestamp acquisition when arming the statistics timer; Kyotaro Horiguchi favored leaving the timer active, and Tom proposed avoiding repeated arming while rejecting a caller-supplied timestamp that could compromise timeout accuracy #8 #9 #13 #17.
- The resulting four-patch submission combined a disable_timeout fast path, persistent statistics-timer handling, hashed-array state reduction and the complete JSON-state relocation; Andrew Dunstan and Michael Paquier found the JSON relocation reasonable #19 #20 #23.
- Andrew added a small patch replacing JsonExprState's embedded FmgrInfo with a pointer, while acknowledging that eliminating recursive expression evaluation required a separate architectural effort #25.
- David adopted Andres's hash-table approach, moved hash_finfo there as well, deferred more initialization until first evaluation and corrected the cast used to obtain inputcollid #27.
- Andres committed the JSON-state relocation from the four-patch submission with light cleanup as 67b26703b4, leaving the deeper expression-evaluation problems and Andrew's FmgrInfo-pointer follow-up separate #28 #30.
- Andres dropped the insufficiently reviewed disable_timeout fast path and committed the statistics-timer portion with an explicit activity check as 056cc366fa #30.
- After Andres endorsed David's revision and the combined-allocation idea, David embedded the hash metadata and function-call storage in one allocation and committed fe3caa1439, backpatching only through PostgreSQL 15 because changing PostgreSQL 14's public structure would break ABI compatibility #31 #32.
- With the immediate size regression fixed, Andres continued pressing for simpler JSON coercion state and warned that the feature might need another release; Andrew then posted a three-patch restructuring, explicitly crediting Amit Langote with most of the implementation #34 #35 #36.
- Amit fixed parallel-worker failures caused by unnecessary coercion subtransactions, then consolidated the series and reduced its number of execution steps while preparing LLVM support #37 #39.
- Amit completed LLVM support and exercised it with forced JIT; Alvaro Herrera's coverage suggestion and David Rowley's recommendation to zero every JIT threshold led to additional successful testing #40 #42 #43 #44 #45.
- Despite those tests and a revision adding comments and local coercion fixes, Andres found an LLVM assertion failure caused by mismatched integer widths, questioned dynamic jump-target storage and challenged the remaining recursive coercion states #46 #49.
- Amit's next revision returned jump targets directly, extracted JSON initialization helpers and moved variable evaluation into jsonpath_exec.c; his experiments also distinguished suppressible JSON-path errors from coercion errors that the existing design handled through subtransactions #51 #53 #54.
- The release management team recommended reverting the SQL/JSON feature set rather than delaying PostgreSQL 15 for an uncertain redesign; Andrew doubted a partial salvage would be practical, and Tom favored a full rewrite before another attempt #55 #56 #59.
- Andres proposed replacing the complicated type-dependent coercion machinery with one I/O-coercion step, Jonathan moved the release decision toward a separate discussion, and Andrew announced a break from JSON work; this supplied thread contains the revert recommendation but no actual revert commit #58 #61 #63 #68.
Feb 2023 · 8 entries
- After a six-month gap, Tom supplied the previously discussed size assertion, and Andres committed it unchanged as 78be04e4c6 #69 #70.
- At the thread's last messages, the size safeguard was installed, the posted JSON restructuring had no demonstrated landing, and Corey Huinker's proposed error-aware casts raised a fresh layout question: Tom and Andres opposed adding error storage to every ExprEvalStep, while Corey's final inline example still used an error-testing jump #71 #72 #73 #74 #75.
- The supplied cross-thread evidence attributes the later standard constructors and aggregates in 7081ac46ac and IS JSON predicate in 6ee30209a6 to components of #502994 in thread #38009, replacing this thread's previous discussion-only attributions.
- Additional constructors JSON(), JSON_SCALAR() and JSON_SERIALIZE() landed as 03734a7fed from #539031 in thread #48026, with light final edits rather than a direct application of this thread's state-size patch.
- The later query-function effort split out JSON-path variable callbacks in faa2b953ba, soft errors for expression coercions in aaaf9449ec, and soft errors for JSON record population in 1edb3b491b, all sourced from components of #551965 in thread #48026.
- SQL/JSON query functions landed as 6185c9737c from #557196 in thread #48026, with local executor changes to an ErrorSaveContext-based design that superseded the subtransaction-based revision discussed here in #54.
- Basic JSON_TABLE landed as de3600452b from #558821 in thread #48026, leaving nesting and PLAN out; NESTED paths and columns followed in bb766cde63 from #559360 in that same thread.
- The latest supplied continuation, 86ab7f4c72, adds JSON_TABLE PLAN clauses from the exactly matching #1147204 in thread #50777, replacing the previous historical attribution to this thread, whose transcript ends at #75.