Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSx9Y-0005zA-Sn for pgsql-general@arkaria.postgresql.org; Wed, 13 Jun 2018 04:13:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fSx9X-0001CA-K5 for pgsql-general@arkaria.postgresql.org; Wed, 13 Jun 2018 04:12:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSx9V-0001Bx-Hj for pgsql-general@lists.postgresql.org; Wed, 13 Jun 2018 04:12:59 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSx9R-0005jz-Py for pgsql-general@postgresql.org; Wed, 13 Jun 2018 04:12:56 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 0535D21B8F; Wed, 13 Jun 2018 00:12:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 13 Jun 2018 00:12:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=XTjoWMMQrMWMum7w939/FTW1BqtIM UygfXZEJ2uTmis=; b=FsJWO0KHlgs7RvAl6n5EKUA5/w6WxDh+L5x+AvaeWSg6a qyEczKasagcB79i0vX8Tsqsh9s3u/TkeVZ6ELPOYqpUtjf93MWhZGwMObUWAt7Ng HJZlVelc9KnjXrQAuWXtJh1/B6wH1Sivr+oB4mgrXwUhFKFT11ONux8EVo2ZEBd3 nDo4C4oLhC54F+K+xcxbBCuwvkTGi3kGCbGwrIMtFQSZChR3N0ucNBXZMLqUifR6 eKl4i3srI+GxYeYYU0+BmQ7fuoDzvEoeY74TcqErg+AAAtvt1Atcu7VWlHAOhxVD QiR8PrMsx393Mul5GHoTH/gkIkXfG0/l4Pws8QGOg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=XTjoWM MQrMWMum7w939/FTW1BqtIMUygfXZEJ2uTmis=; b=l4u4J9F+sI6FRXhdDevdkR 63UY3/L3kq7tyv5MYRysoV5KUqdrjcnZi4Lh3rbfTHzrwZsnuF0u2/PQEVZod3iB bA9K+sy/8pqtRImPPQrRyj/gDoi5riPNdak9LTWo6FmOwoCfThL5SzJ2G8hTQ5VT +M94kVxE9jPXv92SlKFOYKhsYKVO3FNr9l3txzF83OGzzH7exz4JA+Mx1LQP+Sia DBP1qm8ETKWS3TxsAIxrm8P95dMKyLE+MzE8h8l2fIsVvd92ngOmaROl+Znl49Dx nQYlfkDYCk3CCoxjSwHqs55jnwBilgYpbtIRsKDBhXc5Fi/A+yEo/HNNa8Kkti0w == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.159.209]) by mail.messagingengine.com (Postfix) with ESMTPA id 1D9DA102BC; Wed, 13 Jun 2018 00:12:52 -0400 (EDT) Subject: Re: Logging To: "David G. Johnston" , Andrew Bartley Cc: "pgsql-general@postgresql.org" References: <1528857807.2657.3.camel@cybertec.at> From: Adrian Klaver Message-ID: <6b3a4185-611e-5576-d5f8-ec036f67ba86@aklaver.com> Date: Tue, 12 Jun 2018 21:12:51 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.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 06/12/2018 08:25 PM, David G. Johnston wrote: > On Tuesday, June 12, 2018, Andrew Bartley > wrote: > > > > On Wed, 13 Jun 2018 at 12:43 Laurenz Albe > wrote: > > > log_min_duration_statement = 0 > > [...] > > > log_min_duration_statement -1 > > > You've disabled statement logging altogether.  The zero value you were > directed to use is what causes everything to be logged. Actually no: https://www.postgresql.org/docs/10/static/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHEN log_min_duration_statement (integer) "... Setting this to zero prints all statement durations. Minus-one (the default) disables logging statement durations. ..." " So -1 only affects logging statements relative to duration. If you have log_statements set then you will still get statements logged if you have log_min_duration_statement = -1 : Note When using this option together with log_statement, the text of statements that are logged because of log_statement will not be repeated in the duration log message. " This is how I have my logging setup, log_min_duration_statement = -1 and log_statements = 'mod' and I see statements in the logs. > > David J. > > -- Adrian Klaver adrian.klaver@aklaver.com