model-writtenrun 9794 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
May - Jul 2018 · 4 entries
- Adrien Nayrat proposed sampling duration-based statement logs in #1 to capture fast OLTP queries and their parameters without the log volume and performance cost of logging every query.
- David Rowley identified a comparison boundary issue and recommended avoiding random() calls at sampling rates zero and one in #2; Adrien implemented those changes and supplied simpler-query benchmarks in #3.
- Adrien added documentation in #5, and Vik Fearing supplied a revised implementation in #6 that separated sampling from the duration comparison while questioning the setting's broad name and its exclusion of log_duration.
- Adrien considered embedding the sampling rate in log_min_duration_statement in #7, then rejected that composite setting because of tool compatibility and configuration complexity in #8, which also fixed a documentation cross-reference.
Nov 2018 - Jan 2019 · 15 entries
- After several months, discussion resumed over naming and scope; Tomas Vondra proposed log_statement_sample_rate in #17 and argued in #18 that sampling developer statistics logs was less useful than integrating such information into pg_stat_statements.
- Adrien adopted the new name and fixed expression parentheses in #20, which Vik marked ready for a committer in #21; Thomas Munro then found an invalid GUC initializer in #22, fixed by #23.
- Alvaro Herrera supplied formatting fixes and requested clearer descriptions of the duration threshold's interaction with sampling in #24 and #26; Adrien incorporated them into the complete patch in #27.
- Alvaro committed #27 as 88bdbd3f74, explaining in #28 that he also reworded the documentation and avoided calculating in_sample when the duration threshold was not exceeded.
- Nikolay Samokhvalov proposed transaction- or session-level sampling for troubleshooting multi-statement transactions in #29, and Adrien supported the idea in #31, but no implementation followed in this thread.
- Sergei Kornilov reported a compiler warning in #32, tested Alvaro's corrective patch #33, and confirmed a clean build in #34; the patch landed unchanged as 9dc1225855.
- A Coverity warning prompted Tom Lane to revisit random-number usage in #36; after Peter Geoghegan described using setseed() to control internal behavior in #37, Tom explained in #38 that users could similarly influence which statements were logged.
- Peter argued for preserving deterministic internal behavior as a debugging facility in #40, while Tom accepted a restricted mechanism in #43; no such facility was implemented here.
- After objections to redefining random() globally, Tom favored giving SQL random()/setseed() private state in #49; Thomas Munro then pointed out in #51 that PID-and-time seeds remained predictable even with separate state.
- Tom accepted stronger process seeding in #54 and chose lazy initialization for SQL random() in #55, avoiding startup work in processes that never use it.
- While examining the generator, Tom discovered the signed-result bug in pg_jrand48() in #56; e090466411 fixed the cast and improved documentation, with backports to the affected stable branches.
- Fabien COELHO advocated newer generators and benchmarked alternatives in #57, #59, and #61; Tom retained the established algorithm but adopted uint64 arithmetic in #62, producing 6b9bba2df8.
- Tom posted private SQL random()/setseed() state in #63, allowing repeatable SQL random sequences without interference from internal calls; it landed as 6645ad6bdd with only a documentation wording change.
- Tom separately posted stronger per-process seeding in #64, investigated entropy concerns in #65, and reported acceptable startup costs in #68; 4203842a1c landed that patch with additional pg_strong_random.c interface and documentation cleanup.
- All submitted feature and corrective patches had landed by the final exchange, but Peter Eisentraut questioned why log_statement_sample_rate did not affect log_statement in #69, and Adrien's reply in #70 left the naming concern unresolved.