model-writtenrun 8928 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Dec 2018 - Apr 2019 · 5 entries
- Alexey Bashtanov proposed configurable bind-parameter logging for errors and timeouts in #1, saving textual values during binding because user-defined output functions may be unsafe after a transaction abort.
- Peter Eisentraut recommended avoiding changes to the portal API in #2, and Alexey moved current-portal tracking into postgres.c in #5 while retaining parameter storage associated with the portal.
- Peter's extended-protocol tests exposed broken existing parameter logging in #7, leading to the log_parameters_on_error name, a type-validity fix, and a ParamListInfo-based formatting interface in #8.
- Andres Freund questioned deferred conversion, memory lifetime, and differences between input text and output formatting in #11 and #12; Alexey defended saving values before abort and corrected comments and debugging remnants in #13.
- Peter found that input-conversion errors did not receive parameter details in #14 and proposed two-pass binding and broader tests in #17; Alexey explained the complications of partially decoded messages and added a mixed-format execution-error example in #18, leaving input-conversion coverage unresolved.
Jul 2019 · 1 entry
- After a gap, Alexey rebased the patch in #19, and Alvaro Herrera resumed detailed review in #20, moving the example to testlibpq5.c and requesting explicit initialization of saved text pointers, which Alexey supplied in #24.
Sep - Dec 2019 · 16 entries
- Andres argued in #21 and #23 that parameter reporting should use error callbacks and a prebuilt combined string to avoid coupling elog.c to portals and allocating large strings during error handling.
- Alexey initially retained the design while clarifying its documentation in #25, but Andres reiterated his objections in #28, including missing support for server-generated parameterized queries and emit_log_hook.
- Alexey substantially redesigned the patch in #30 around error callbacks and a preformatted parameter string, keeping callback installation in exec_*_message so planning failures were covered and introducing a more efficient quoting helper.
- Alvaro extracted Alexey's quoting helper in #32 and applied it to postgres.c and PL/pgSQL, while leaving other quoting sites unchanged because their escaping requirements differed.
- Alvaro explored bounded parameter output and frontend strndup support in #35, then combined the unbounded helper with a cleaned-up main logging patch in #36, explicitly postponing truncation.
- The callback initially wrote into DETAIL, and Alvaro's #39 simplified parameter formatting while acknowledging that input-conversion failures still lacked the new parameter report.
- Tom Lane blocked the proposed DETAIL behavior in #40 because it overwrote existing diagnostics, recommending an appended CONTEXT entry with the portal name and automated pgbench tests.
- Alvaro supplied the CONTEXT conversion and a text-input lifetime fix in #41, then folded them into #43 with pgbench tests and bounded error-parameter output.
- Tom's review in #45 identified unsafe multibyte truncation, unnecessary allocation heuristics, and questionable callback-data lifetime, and supported removing the manual example test.
- Frontend dependency concerns in #50 led Alvaro to compare alternative builds in #52 and choose a backend-only stringinfo_mb.c helper, avoiding extra multibyte code in frontend executables and the associated portability prerequisite.
- Tom opposed truncating established parameter-reporting behavior without configuration in #55 and #62, so existing duration and PL/pgSQL reports retained complete values while the new error reporting used a fixed limit.
- Following Tom's helper review in #59, Alvaro corrected documentation and supplied a dedicated header in #64; 6cafde1bd4 landed that patch with declaration cleanup and a simpler final append, announced in #66.
- Alvaro updated the remaining logging patch in #65 with explicit callback-data variables, safer multibyte copying, simpler allocation, and removal of testlibpq5.c.
- Alvaro discovered in #67 that duration logging populated the saved parameter string and thereby enabled error reporting even when disabled; #68 fixed this by returning the formatted string and letting callers decide whether to retain it.
- ba79cb5dc8 landed the logging implementation from #68 with comment refinements and additional regression coverage ensuring duration reports remained untruncated.
- Both changes were committed by the end of the thread, but Andres objected in #69 that exec_* integration would require duplication for server-side queries; Alvaro defended the improvement in #70 while leaving broader portal and PL/pgSQL integration open.