The performance as seen from the clients dropped substantially after turning on the extra logging. The numbers were real but the performance dropped significantly.
All the log related settings in postgresql.conf are below: log_destination = 'stderr' # Valid values are combinations of #log_directory = 'pg_log' # directory where log files are written, #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, #log_truncate_on_rotation = off # If on, an existing log file of the #log_rotation_age = 1d # Automatic rotation of logfiles will #log_rotation_size = 10MB # Automatic rotation of logfiles will #syslog_facility = 'LOCAL0' #syslog_ident = 'postgres' #log_min_messages = warning # values in order of decreasing detail: #log_error_verbosity = default # terse, default, or verbose messages #log_min_error_statement = error # values in order of decreasing detail: log_min_duration_statement = 0 # -1 is disabled, 0 logs all statements log_checkpoints = on #log_connections = off #log_disconnections = off #log_duration = off #log_hostname = off log_line_prefix = '%t ' # special values: #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 #log_timezone = unknown # actually, defaults to TZ environment #log_parser_stats = off #log_planner_stats = off #log_executor_stats = off #log_statement_stats = off #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and ________________________________ From: Tom Lane <t...@sss.pgh.pa.us> To: A J <s5...@yahoo.com> Cc: Kevin Grittner <kevin.gritt...@wicourts.gov>; Scott Marlowe <scott.marl...@gmail.com>; pgsql-admin@postgresql.org Sent: Thu, September 2, 2010 2:06:43 PM Subject: Re: [ADMIN] Confused by 'timing' results A J <s5...@yahoo.com> writes: > On second try, by trying to log to log_directory/log_filename by > setting log_min_duration_statement=0, seems to be doing something weird. The > durations are very very high in the file and cannot be true. You're not being very clear here. Did the logged durations not correspond to reality? Or did the performance as seen from the clients drop substantially when you turned on extra logging? Also, exactly how are you doing logging (ie, what are your settings for log_destination and related parameters)? regards, tom lane