From 75506195da81d75597a4025b72f8367e6c45f60d Mon Sep 17 00:00:00 2001 From: Tomas Vondra Date: Sun, 4 Aug 2019 20:29:00 +0200 Subject: Revert "Add log_statement_sample_rate parameter" This reverts commit 88bdbd3f746049834ae3cc972e6e650586ec3c9d. As committed, statement sampling used the existing duration threshold (log_min_duration_statement) when decide which statements to sample. The issue is that even the longest statements are subject to sampling, and so may not end up logged. An improvement was proposed, introducing a second duration threshold, but it would not be backwards compatible. So we've decided to revert this feature - the separate threshold should be part of the feature itself. Discussion: https://postgr.es/m/CAFj8pRDS8tQ3Wviw9%3DAvODyUciPSrGeMhJi_WPE%2BEB8%2B4gLL-Q%40mail.gmail.com --- doc/src/sgml/config.sgml | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index c91e3e15507..1f8d1bdb27d 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -5850,13 +5850,12 @@ local0.* /var/log/postgresql Causes the duration of each completed statement to be logged if the statement ran for at least the specified number of - milliseconds, modulated by log_statement_sample_rate. - Setting this to zero prints all statement durations. - -1 (the default) disables logging statements due to - exceeding duration threshold; for example, if you set it to - 250ms, then all SQL statements that run 250ms or - longer will be logged. Enabling this parameter can be helpful in - tracking down unoptimized queries in your applications. + milliseconds. Setting this to zero prints all statement durations. + Minus-one (the default) disables logging statement durations. + For example, if you set it to 250ms + then all SQL statements that run 250ms or longer will be + logged. Enabling this parameter can be helpful in tracking down + unoptimized queries in your applications. Only superusers can change this setting. @@ -5882,27 +5881,6 @@ local0.* /var/log/postgresql - - log_statement_sample_rate (real) - - log_statement_sample_rate configuration parameter - - - - - Determines the fraction of statements that exceed - to be logged. - The default is 1.0, meaning log all such - statements. - Setting this to zero disables logging by duration, same as setting - log_min_duration_statement to - -1. - log_statement_sample_rate is helpful when the - traffic is too high to log all queries. - - - - log_transaction_sample_rate (real) -- cgit v1.2.3