model-writtenrun 6375 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jacob Champion split JSON API support out of his OAUTHBEARER work, proposing shared-library logging changes and consistently allocated error strings so libpq could use the parser without leaking memory #1.
- Michael Paquier reworked the proposal to eliminate logging entirely and handle frontend allocation failures explicitly, preferring internally allocated error messages over caller-supplied storage #2; Jacob agreed with that direction but warned about unsafe sprintf-based formatting and questioned the lack of enforced libpq dependency restrictions #3.
- Jacob's dependency observation led Michael to identify a PostgreSQL 14 regression: service-file parsing could terminate the application through StringInfo's allocation routines #3 #4; Daniel recommended reverting that part instead of introducing PQExpBuffer so late in the release cycle #5.
- Tom Lane explained that merely excluding allocation helpers from libpq's link could still resolve those symbols from the client executable, then implemented the service-file fix directly from discussion: 8ec00dc5cd restores bounded input with a larger 1024-byte buffer while retaining the existing single cleanup path #6.
- Tom's broader audit found abort() calls in printing and mutex handling, and he also challenged whether JSON parsing belonged inside libpq at all #6; his independent printing patch replaced abort-on-OOM with returns and centralized cleanup #7.
- Tom proposed replacing mutex-failure aborts with Assert(false), preserving diagnostics in assertion-enabled builds while ignoring these apparently unobserved failures in production #8; Michael meanwhile explained that OAUTHBEARER error responses use JSON but left open whether libpq could simply pass that data to callers #9.
- Tom committed the printing patch from #7 with light allocation-check cleanup as 6f5d9bce57 and backpatched it to supported branches.
- After investigating the mutex callback APIs and finding no reported field failures, Tom proposed applying the assertion change only to HEAD #10; Daniel endorsed that compromise #11, and aaddf6ba09 implemented it without an attached patchset.
- Jacob moved the question of whether OAuth justified JSON parsing back toward the main OAuth discussion and suggested an asprintf facility #12 #13; Tom recommended PQExpBuffer, briefly considered moving it into src/common, then withdrew that suggestion because libpq already exports it and duplicate definitions would complicate linking #14 #16.
- After the commits, Peter Eisentraut explained that the abort() calls had deliberately replaced exit() and questioned backpatching the printing change #17; Tom defended avoiding either form of process termination and explained that retrofitting useful error reporting into the legacy printing API was difficult #18.
- Michael and Tom concluded that further JSON API work should wait until JSON parsing inside libpq was justified #19 #20; Jacob withdrew the proposal from the commitfest while continuing allocation work in the OAuth proof of concept, leaving the three libpq cleanups committed and the original JSON integration uncommitted #21.