Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gmgr2-0000vz-FW for pgsql-general@arkaria.postgresql.org; Thu, 24 Jan 2019 15:23:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gmgr0-0001OP-L4 for pgsql-general@arkaria.postgresql.org; Thu, 24 Jan 2019 15:23:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gmgr0-0001La-Am for pgsql-general@lists.postgresql.org; Thu, 24 Jan 2019 15:23:42 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gmgqw-0008AV-9X for pgsql-general@lists.postgresql.org; Thu, 24 Jan 2019 15:23:41 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 41749236D1; Thu, 24 Jan 2019 10:23:36 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 24 Jan 2019 10:23:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=L Rea5q/l2u+u70IlVoKuuDKuk1Jis7mRa8gnNF2lg7s=; b=aXDh0KRl5j51Qg8Zv 33O03vR37v+be+aWS3fJVdZW94RigdMWbN1svdgWP8PlkCMD7vEtVpDKs9EbEdqj zRXy4zP/0qTzXygbfdjnxMXQ/hXZk3Ube/0C5K0MFNjQENJ74fOs6VqHw5dwTc2s F95/Arzqi4yc1e+b6WQTfM2w0gl2lpk1VGn0DlEZdw572agJAkq34Km2yCJ8DRQw BJW6lDsKoxO6m6xVHB+R0ArlpP0Wbj/GJwHQ7qgJ8YMpP8FE8kgHdsBvrMndtgrV nWeqrS36nSSdtHuXO4Lmtcsj6AvSebFu2m3EKwUIKBZhmGm4G6q7taZmQg5Br15d QpJlw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=LRea5q/l2u+u70IlVoKuuDKuk1Jis7mRa8gnNF2lg 7s=; b=f7HFjqdhY6TYAPouSJ4QC86dON3JUgdMCTwSCsfAh5d+Togv/t5n91v9R x3tenUtMU3w/E7NF4/MkVxomNAs8LbRxzZWy3TA1K9bcIZRgvlKOdaH9DI9vTB31 vo+Fuy9p/0tg1r4EPQBU28HS7C50rg92eBHDU6D/rukp1/kT1r2Gaw5LqMMD2Obn Sh6QLZxclgw67o2PnwtWOwxeXVGIe3UhsoFq5xPraPe6icCRKCk01xnaItA3WJ8+ W7Q+n1sfi03UZa8fWmGPOeJtwRYLVtwiRM8rzSvJ1Cgt4XBIPKRcyTjVw+jxkcWF EhRqoHxP0pxs1vPnE/o4e8W56+xEg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledriedvgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpe etughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgv rhdrtghomheqnecukfhppeejuddrvdduvddrudefgedrfeenucfrrghrrghmpehmrghilh hfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhenucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.2] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 4E6D1E4383; Thu, 24 Jan 2019 10:23:35 -0500 (EST) Subject: Re: log_min_duration_statement To: bhargav kamineni , pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: <1c863dfe-116c-1d53-69d4-0b9cb658b698@aklaver.com> Date: Thu, 24 Jan 2019 07:23:34 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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