model-writtenrun 9242 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Pavel Stehule proposed a duration limit above which statements would always be logged, because statement sampling could otherwise omit even the slowest queries; Gilles Darold supported the requirement and identified the interaction with log_min_duration_statement #1 #2.
- Pavel Stehule implemented log_statement_sample_limit and then revised its threshold predicate, keeping sampling below the new limit and bypassing it above that limit for statements eligible for duration logging #3 #4.
- Adrien Nayrat tried the patch and supplied clearer documentation and comments, questioning the description of zero and the every_time variable name; discussion retained the basic design and favored explaining threshold interactions in the documentation #5 #6 #7.
- Adrien Nayrat subsequently reported successful testing of the documentation revision and marked it ready for a committer, correcting an initial accidental selection of failed test results #9 #10.
- Tomas Vondra found the minimum-duration and maximum-sampling thresholds confusing and proposed two independent minimum thresholds: log_min_duration_sample for sampling and log_min_duration_statement for unconditional logging; Tom Lane supported changing the semantics before the feature reached a released version #12 #13.
- Tomas Vondra posted a work-in-progress implementation of the two-minimum-threshold design, while noting that its documentation needed work and introducing a new setting during the v12 feature freeze was questionable #14.
- Michael Paquier recommended reverting statement sampling from v12 rather than redesigning it near beta3; Tomas Vondra accepted that direction, and Adrien Nayrat agreed that clearer semantics in v13 were preferable #15 #18 #19.
- Before reverting, Tomas Vondra and Tom Lane clarified that transaction sampling was independent of statement duration and should remain, with each logging mechanism independently sufficient to cause logging #20 #21 #22 #23 #24.
- Tomas Vondra first reverted the statement-sampling compiler-warning fix in 4f9ed8f3c5, implementing the discussion's removal decision without an attached revert patch #20.
- Tomas Vondra then removed log_statement_sample_rate in 75506195da and confirmed that statement sampling had been reverted on master and REL_12_STABLE while transaction sampling remained #25.
- In November, Tomas Vondra reported that a reworked statement-sampling feature had landed, Adrien Nayrat confirmed that unconditional logging through log_min_duration_statement now satisfied the original requirement, and Tomas marked this proposal rejected as unnecessary #26 #27 #28.