model-writtenrun 9577 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Adrien Nayrat proposed logging every statement in a randomly selected fraction of transactions, crediting Nikolay Samokhvalov's idea and asking how to test duration-bearing output and handle setting changes inside transactions #1.
- Peter Eisentraut and Masahiko Sawada questioned the use case, and Adrien explained that complete transaction samples help diagnose application behavior involving fast queries without logging all traffic; Michael Paquier and Robert Haas supported that rationale #2 #6 #7 #9 #16.
- Hayato Kuroda tested the initial patch and reported unexpected tab-completion logging, which Adrien explained was expected, while Adrien separately fixed a duplicate variable definition in the next submission #4 #5.
- Hayato questioned the word 'rate', but accepted consistency with existing sampling parameters; his subsequent review led to documentation and comment improvements while Adrien retained the existing logging function and avoided an unnecessary transaction-end reset #8 #10 #15 #17.
- Masahiko initially proposed allowing logging to be disabled within an already sampled transaction, and Adrien implemented the additional checks and then documented that behavior #11 #12 #17.
- Hayato proposed deterministic tests for sampling rates zero and one and for disabling logging mid-transaction, but duration output and test cost remained concerns, and no test additions appeared in the submitted series #18 #19 #20 #22.
- Andres Freund requested an overhead warning, questioned the location of the sampling flag and its handling after errors, and challenged mid-transaction setting changes; Adrien moved the flag into xact.c and added the warning while leaving error handling unchanged so that ROLLBACK could still be logged #23 #24 #25.
- Hayato later suggested counter-based sampling to avoid uneven results at low rates, but Adrien defended random sampling because the feature was intended for troubleshooting rather than precise statistics #27 #28.
- Masahiko reversed his earlier recommendation about disabling logging mid-transaction, favored retaining ROLLBACK logging, and requested avoiding random() at rates zero and one; Adrien incorporated those changes and removed an unrelated statement-sampling wording edit #29 #30 #31.
- Masahiko and Christoph Berg prompted the final numeric-format consistency fixes, producing the final attachment, and Hayato marked the feature ready for a committer #32 #33 #35 #36 #37.
- Alvaro Herrera announced that the transaction-sampling feature had been committed with documentation wording changes; the separate statement-sampling documentation cleanup landed as d1f04b96b9 from Justin Pryzby's later patch #422269 in thread #40347, rather than from this thread's attachments #39.
- The thread ended with Adrien thanking the committer and reviewers and offering no further documentation changes, leaving the transaction-sampling feature landed with no outstanding revision request #40.