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 1iSYgu-000541-RS for pgsql-docs@arkaria.postgresql.org; Thu, 07 Nov 2019 03:42:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iSYgt-0004ZM-JY for pgsql-docs@arkaria.postgresql.org; Thu, 07 Nov 2019 03:42:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSYgt-0004ZF-9H for pgsql-docs@lists.postgresql.org; Thu, 07 Nov 2019 03:42:35 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iSYgq-0006Q1-K6 for pgsql-docs@lists.postgresql.org; Thu, 07 Nov 2019 03:42:34 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1iSYgo-0008Jm-H3; Wed, 06 Nov 2019 22:42:30 -0500 Date: Wed, 6 Nov 2019 22:42:30 -0500 From: Bruce Momjian To: turon.david@seznam.cz, pgsql-docs@lists.postgresql.org Subject: Re: auto_explain.log_min_duration is limit for nested statement Message-ID: <20191107034230.GC12478@momjian.us> References: <157285150885.14272.17400824163768264403@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <157285150885.14272.17400824163768264403@wrigleys.postgresql.org> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Nov 4, 2019 at 07:11:48AM +0000, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/12/auto-explain.html > Description: > > Hello, > > I had problem with setup auto_explain.log_min_duration for COPY command on > table with triggers. I set minimum duration to '2s' but no plan logged > (duration of COPY command was above this limit). I thought that this > extension not working with COPY command. After some testing I investigate > that extension is working becouse duration limit is for nested statement > (query in trigger) not for base statement (COPY) - it will be fine write > somewere in documentation. COPY doesn't go through the optimizer, so there is nothing to explain, e.g., test=> EXPLAIN COPY test FROM STDIN; ERROR: syntax error at or near "COPY" LINE 1: EXPLAIN COPY test FROM STDIN; ^ -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +