Re: log_min_duration_statement units - Mailing list pgsql-docs
From | Bruce Momjian |
---|---|
Subject | Re: log_min_duration_statement units |
Date | |
Msg-id | 200904070220.n372KZ421215@momjian.us Whole thread Raw |
In response to | Re: log_min_duration_statement units (Bruce Momjian <bruce@momjian.us>) |
Responses |
Re: log_min_duration_statement units
|
List | pgsql-docs |
Bruce Momjian wrote: > Euler Taveira de Oliveira wrote: > > Bruce Momjian escreveu: > > > Someone complained that the default units for log_min_duration_statement > > > was not mentioned in postgresql.conf; this applied patch fixes that. > > > > > IMHO -1ms doesn't make much sense. Also, some other parameters don't have > > units too. They are: archive_timeout, autovacuum_vacuum_cost_delay, > > log_autovacuum_min_duration, log_temp_files, statement_timeout, > > tcp_keepalives_idle, and tcp_keepalives_interval. What about mention the unit > > in the comment that follows it? The last two already have it. > > Thanks for the list! Here is an applied patch that cleans these up, > plus fixes log_min_duration_statement. Oops, here is the patch; Euler, would you look to see if you can find anything else missing; you seem to be good at that. :-) -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + Index: src/backend/utils/misc/guc.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v retrieving revision 1.499 diff -c -c -r1.499 guc.c *** src/backend/utils/misc/guc.c 2 Apr 2009 19:57:19 -0000 1.499 --- src/backend/utils/misc/guc.c 6 Apr 2009 20:56:57 -0000 *************** *** 1530,1536 **** { {"statement_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT, ! gettext_noop("Sets the maximum allowed duration of any statement."), gettext_noop("A value of 0 turns off the timeout."), GUC_UNIT_MS }, --- 1530,1536 ---- { {"statement_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT, ! gettext_noop("Sets the maximum duration of any statement, in milliseconds."), gettext_noop("A value of 0 turns off the timeout."), GUC_UNIT_MS }, *************** *** 1684,1690 **** { {"log_autovacuum_min_duration", PGC_SIGHUP, LOGGING_WHAT, ! gettext_noop("Sets the minimum execution time above which " "autovacuum actions will be logged."), gettext_noop("Zero prints all actions. -1 turns autovacuum logging off."), GUC_UNIT_MS --- 1684,1690 ---- { {"log_autovacuum_min_duration", PGC_SIGHUP, LOGGING_WHAT, ! gettext_noop("Sets the minimum execution milliseconds above which " "autovacuum actions will be logged."), gettext_noop("Zero prints all actions. -1 turns autovacuum logging off."), GUC_UNIT_MS *************** *** 1871,1877 **** { {"tcp_keepalives_idle", PGC_USERSET, CLIENT_CONN_OTHER, ! gettext_noop("Time between issuing TCP keepalives."), gettext_noop("A value of 0 uses the system default."), GUC_UNIT_S }, --- 1871,1877 ---- { {"tcp_keepalives_idle", PGC_USERSET, CLIENT_CONN_OTHER, ! gettext_noop("Seconds between issuing TCP keepalives."), gettext_noop("A value of 0 uses the system default."), GUC_UNIT_S }, *************** *** 1881,1887 **** { {"tcp_keepalives_interval", PGC_USERSET, CLIENT_CONN_OTHER, ! gettext_noop("Time between TCP keepalive retransmits."), gettext_noop("A value of 0 uses the system default."), GUC_UNIT_S }, --- 1881,1887 ---- { {"tcp_keepalives_interval", PGC_USERSET, CLIENT_CONN_OTHER, ! gettext_noop("Seconds between TCP keepalive retransmits."), gettext_noop("A value of 0 uses the system default."), GUC_UNIT_S }, Index: src/backend/utils/misc/postgresql.conf.sample =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/misc/postgresql.conf.sample,v retrieving revision 1.257 diff -c -c -r1.257 postgresql.conf.sample *** src/backend/utils/misc/postgresql.conf.sample 6 Apr 2009 19:03:04 -0000 1.257 --- src/backend/utils/misc/postgresql.conf.sample 6 Apr 2009 20:56:57 -0000 *************** *** 122,128 **** # - Cost-Based Vacuum Delay - ! #vacuum_cost_delay = 0 # 0-100 milliseconds #vacuum_cost_page_hit = 1 # 0-10000 credits #vacuum_cost_page_miss = 10 # 0-10000 credits #vacuum_cost_page_dirty = 20 # 0-10000 credits --- 122,128 ---- # - Cost-Based Vacuum Delay - ! #vacuum_cost_delay = 0ms # 0-100 milliseconds #vacuum_cost_page_hit = 1 # 0-10000 credits #vacuum_cost_page_miss = 10 # 0-10000 credits #vacuum_cost_page_dirty = 20 # 0-10000 credits *************** *** 175,181 **** # (change requires restart) #archive_command = '' # command to use to archive a logfile segment #archive_timeout = 0 # force a logfile segment switch after this ! # time; 0 is off #------------------------------------------------------------------------------ --- 175,181 ---- # (change requires restart) #archive_command = '' # command to use to archive a logfile segment #archive_timeout = 0 # force a logfile segment switch after this ! # number of seconds; 0 is off #------------------------------------------------------------------------------ *************** *** 306,314 **** # fatal # panic (effectively off) ! #log_min_duration_statement = -1ms # -1 is disabled, 0 logs all statements # and their durations, > 0 logs only ! # statements running at least this time. #silent_mode = off # DO NOT USE without syslog or # logging_collector --- 306,315 ---- # fatal # panic (effectively off) ! #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements # and their durations, > 0 logs only ! # statements running at least this number ! # of milliseconds #silent_mode = off # DO NOT USE without syslog or # logging_collector *************** *** 346,352 **** #log_lock_waits = off # log lock waits >= deadlock_timeout #log_statement = 'none' # none, ddl, mod, all #log_temp_files = -1 # log temporary files equal or larger ! # than specified size; # -1 disables, 0 logs all temp files #log_timezone = unknown # actually, defaults to TZ environment # setting --- 347,353 ---- #log_lock_waits = off # log lock waits >= deadlock_timeout #log_statement = 'none' # none, ddl, mod, all #log_temp_files = -1 # log temporary files equal or larger ! # than the specified size in kilobytes; # -1 disables, 0 logs all temp files #log_timezone = unknown # actually, defaults to TZ environment # setting *************** *** 382,388 **** # requires track_counts to also be on. #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and # their durations, > 0 logs only ! # actions running at least that time. #autovacuum_max_workers = 3 # max number of autovacuum subprocesses #autovacuum_naptime = 1min # time between autovacuum runs #autovacuum_vacuum_threshold = 50 # min number of row updates before --- 383,390 ---- # requires track_counts to also be on. #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and # their durations, > 0 logs only ! # actions running at least this number ! # of milliseconds. #autovacuum_max_workers = 3 # max number of autovacuum subprocesses #autovacuum_naptime = 1min # time between autovacuum runs #autovacuum_vacuum_threshold = 50 # min number of row updates before *************** *** 393,401 **** #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum # (change requires restart) ! #autovacuum_vacuum_cost_delay = 20 # default vacuum cost delay for ! # autovacuum, -1 means use ! # vacuum_cost_delay #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for # autovacuum, -1 means use # vacuum_cost_limit --- 395,403 ---- #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum # (change requires restart) ! #autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for ! # autovacuum, in milliseconds; ! # -1 means use vacuum_cost_delay #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for # autovacuum, -1 means use # vacuum_cost_limit *************** *** 415,421 **** #default_transaction_isolation = 'read committed' #default_transaction_read_only = off #session_replication_role = 'origin' ! #statement_timeout = 0 # 0 is disabled #vacuum_freeze_min_age = 50000000 #vacuum_freeze_table_age = 150000000 #xmlbinary = 'base64' --- 417,423 ---- #default_transaction_isolation = 'read committed' #default_transaction_read_only = off #session_replication_role = 'origin' ! #statement_timeout = 0 # in milliseconds, 0 is disabled #vacuum_freeze_min_age = 50000000 #vacuum_freeze_table_age = 150000000 #xmlbinary = 'base64'
pgsql-docs by date: