model-writtenrun 4073 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- James Pang (chaolpan) reported a PostgreSQL 14.8 session consuming 100% CPU for hours while querying pg_stat_ssl and resisting pg_terminate_backend, with a stack pointing into the record-type cache #1; Michael Paquier initially requested a reproducible case and more diagnostic detail #3.
- Thomas Munro suspected the array-growth loop and requested RecordCacheArrayLen #6, which James confirmed was zero #7.
- Thomas proposed that allocation of RecordCacheArray had succeeded but allocation of RecordIdentifierArray had failed before the length was initialized #9; James found contemporaneous out-of-memory events #10 and confirmed the first pointer was non-null while the second was null #12.
- Thomas confirmed the exception-safety defect #13 and submitted a patch merging the two arrays into struct entries, preferring one allocation over merely reordering the existing allocations #14.
- Michael endorsed the merged-array design over explicit allocation-failure handling, noted that the bug could affect ordinary sessions without the extended query protocol, and requested an indentation correction #15.
- Thomas planned to defer pushing and back-patching until after the PostgreSQL 16.0 release work because the failure was extremely unlikely #16, and Michael agreed #17.
- The patch landed with light formatting and comment edits as development-branch commit 3acd0599bd; the separately listed candidate a26cc0334f is the same fix adapted to REL_15_STABLE's allocation APIs, not a second design.
- Thomas's final message confirmed that pushing and back-patching were done, leaving no outstanding patch revisions in the thread #18.