From ccdb6627ee07f4bad658905c8b0c56cd29731e43 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 2 Jan 2009 01:16:02 +0000 Subject: Tweak guc.c to allow underscores in the names of custom variable classes, and change auto_explain's custom GUC variables to be named auto_explain.xxx not just explain.xxx. Per discussion in connection with the pg_stat_statements patch, it seems like a good idea to have the convention that custom variable classes are named the same as their defining module. Committing separately since this should happen regardless of what happens with pg_stat_statements itself. --- doc/src/sgml/auto-explain.sgml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/auto-explain.sgml b/doc/src/sgml/auto-explain.sgml index 1a6dce0e427..c1e85af10e0 100644 --- a/doc/src/sgml/auto-explain.sgml +++ b/doc/src/sgml/auto-explain.sgml @@ -1,4 +1,4 @@ - + auto_explain @@ -38,20 +38,20 @@ LOAD 'auto_explain'; There are several configuration parameters that control the behavior of auto_explain. Note that the default behavior is to do nothing, so you must set at least - explain.log_min_duration if you want any results. + auto_explain.log_min_duration if you want any results. - explain.log_min_duration (integer) + auto_explain.log_min_duration (integer) - explain.log_min_duration configuration parameter + auto_explain.log_min_duration configuration parameter - explain.log_min_duration is the minimum statement + auto_explain.log_min_duration is the minimum statement execution time, in milliseconds, that will cause the statement's plan to be logged. Setting this to zero logs all plans. Minus-one (the default) disables logging of plans. For example, if you set it to @@ -63,14 +63,14 @@ LOAD 'auto_explain'; - explain.log_analyze (boolean) + auto_explain.log_analyze (boolean) - explain.log_analyze configuration parameter + auto_explain.log_analyze configuration parameter - explain.log_analyze causes EXPLAIN ANALYZE + auto_explain.log_analyze causes EXPLAIN ANALYZE output, rather than just EXPLAIN output, to be printed when an execution plan is logged. This parameter is off by default. Only superusers can change this setting. @@ -87,14 +87,14 @@ LOAD 'auto_explain'; - explain.log_verbose (boolean) + auto_explain.log_verbose (boolean) - explain.log_verbose configuration parameter + auto_explain.log_verbose configuration parameter - explain.log_verbose causes EXPLAIN VERBOSE + auto_explain.log_verbose causes EXPLAIN VERBOSE output, rather than just EXPLAIN output, to be printed when an execution plan is logged. This parameter is off by default. Only superusers can change this setting. @@ -104,14 +104,14 @@ LOAD 'auto_explain'; - explain.log_nested_statements (boolean) + auto_explain.log_nested_statements (boolean) - explain.log_nested_statements configuration parameter + auto_explain.log_nested_statements configuration parameter - explain.log_nested_statements causes nested + auto_explain.log_nested_statements causes nested statements (statements executed inside a function) to be considered for logging. When it is off, only top-level query plans are logged. This parameter is off by default. Only superusers can change this setting. @@ -122,16 +122,16 @@ LOAD 'auto_explain'; In order to set these parameters in your postgresql.conf file, - you will need to add explain in - custom_variable_classes. Typical usage might be: + you will need to add auto_explain to + . Typical usage might be: # postgresql.conf shared_preload_libraries = 'auto_explain' -custom_variable_classes = 'explain' -explain.log_min_duration = '3s' +custom_variable_classes = 'auto_explain' +auto_explain.log_min_duration = '3s' @@ -140,7 +140,7 @@ explain.log_min_duration = '3s' postgres=# LOAD 'auto_explain'; - postgres=# SET explain.log_min_duration = 0; + postgres=# SET auto_explain.log_min_duration = 0; postgres=# SELECT count(*) FROM pg_class, pg_index WHERE oid = indrelid AND indisunique; -- cgit v1.2.3