pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: bhargav kamineni <bhargavpostgres@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: log_min_duration_statement
Date: Thu, 24 Jan 2019 07:23:34 -0800
Message-ID: <1c863dfe-116c-1d53-69d4-0b9cb658b698@aklaver.com> (raw)
In-Reply-To: <CADCf-WMAcBrMYn6fxCCTpH+Nd4btPChab1VR0DgL6sbzJE8RsQ@mail.gmail.com>
References: <CADCf-WMAcBrMYn6fxCCTpH+Nd4btPChab1VR0DgL6sbzJE8RsQ@mail.gmail.com>

On 1/24/19 6:23 AM, bhargav kamineni wrote:
> Hi Team,,
> 
> I have set log_min_duration_statement=1000 as my configuration but when 
> i observe log file i could see queries that ran below 1000ms are also 
> getting logged , for instance
> duration: 0.089 ms
>   duration: 0.175 ms
>   duration: 0.139 ms
>   duration: 0.451 ms
> duration: 0.136 ms
>   duration: 0.340 ms
>   duration: 0.150 ms
> duration: 0.440 ms
> duration: 0.338 ms
>   duration: 0.156 ms
> tion: 0.396 ms
>   duration: 0.221 ms
> duration: 0.161 ms
>   *************

The above would not happen to be autovacuum statements?

You have log_autovacuum_min_duration = 0 below.

> these are my logsettings
> 
>                name               |                      setting
> ---------------------------------+---------------------------------------------------
>   log_autovacuum_min_duration     | 0
>   log_checkpoints                 | on
>   log_connections                 | on
>   log_destination                 | syslog
>   log_directory                   | log
>   log_disconnections              | on
>   log_duration                    | off
>   log_error_verbosity             | default
>   log_executor_stats              | off
>   log_file_mode                   | 0600
>   log_filename                    | postgresql-%Y-%m-%d_%H%M%S.log
>   log_hostname                    | off
>   log_line_prefix                 | 
> appname=%a,user=%u,db=%d,pid=%p,txid=%x,vtxid=%v
>   log_lock_waits                  | on
>   log_min_duration_statement      | 1000
>   log_min_error_statement         | error
>   log_min_messages                | error
>   log_parser_stats                | off
>   log_planner_stats               | off
>   log_replication_commands        | off
>   log_rotation_age                | 1440
>   log_rotation_size               | 10240
>   log_statement                   | all
>   log_statement_stats             | off
>   log_temp_files                  | 0
>   log_timezone                    | Navajo
>   log_truncate_on_rotation        | off
>   logging_collector               | on
>   max_logical_replication_workers | 4
>   syslog_facility                 | local4
>   syslog_ident                    | postgres
>   syslog_sequence_numbers         | on
>   syslog_split_messages           | on
>   wal_log_hints                   | off
> 
> Regards,
> Bhargav K
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com




view thread (6+ messages)  latest in thread

Message-ID: <1c863dfe-116c-1d53-69d4-0b9cb658b698@aklaver.com>
Permalink:  ../1c863dfe-116c-1d53-69d4-0b9cb658b698@aklaver.com/
Also on:    postgresql.org/message-id/1c863dfe-116c-1d53-69d4-0b9cb658b698@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, bhargavpostgres@gmail.com
  Subject: Re: log_min_duration_statement
  In-Reply-To: <1c863dfe-116c-1d53-69d4-0b9cb658b698@aklaver.com>
  References: <CADCf-WMAcBrMYn6fxCCTpH+Nd4btPChab1VR0DgL6sbzJE8RsQ@mail.gmail.com> <1c863dfe-116c-1d53-69d4-0b9cb658b698@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox