Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFZjO-0000Wl-CU for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Aug 2021 10:20:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mFZjM-00028Y-05 for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Aug 2021 10:20:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFZEk-0007JI-K9 for pgsql-bugs@lists.postgresql.org; Mon, 16 Aug 2021 09:48:54 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFZEi-0006Jc-LZ for pgsql-bugs@lists.postgresql.org; Mon, 16 Aug 2021 09:48:54 +0000 Received: from MacBook-Pro.fritz.box ([84.119.133.170]) by mrelayeu.kundenserver.de (mreue009 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MowT0-1mrbh63tjK-00qVd6; Mon, 16 Aug 2021 11:48:50 +0200 Subject: Re: BUG #17146: pg_dump statements are going into pg_stat_statements in 13.4 To: Julien Rouhaud Cc: PostgreSQL mailing lists References: <17146-fd449661169489e5@postgresql.org> From: James Inform Message-ID: <9586ada6-344e-ff26-8c16-6c847a984220@pharmapp.de> Date: Mon, 16 Aug 2021 11:48:49 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:52.0) Gecko/20100101 PostboxApp/7.0.48 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: de-DE X-Provags-ID: V03:K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ovMynzFeqjYSUHrapmY WfzuJZMCo7q7mS6OaqXjVZU3id+KozzRhpdBIecheYZGpZqtYF7bUbQMssp0kntBkw62COqs6 CKTeC4Oz4G28gEgIXmow== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk That's strange. I see those copy commands it pg_stat_statments and they have 1 calls. The backup job runs once a day since many months. I would expect to see calls > 1 then. So again very strange, but maybe a layer 8 problem :)  I will recheck. Julien Rouhaud Wrote: > On Mon, Aug 16, 2021 at 4:46 PM PG Bug reporting form > wrote: >> The following bug has been logged on the website: >> >> I have just updated to 13.4 and I have noticed that "COPY" statements that >> are produced by pg_dump appear in pg_stat_statements view. >> >> You can imagine that the copy statements are slower than all my other >> statements, so they come up as the first and most expensive statements in >> pg_stat_statements. > You could order by the average execution time rather than the total > execution time and/or filter out queries executed less than X times, > it's more likely to give you low hanging fruits. > >> This is a new behaviour in 13.4 and hasn't existed in 13.3 and prior. > Nothing changed here for a long time. > >> Is there a setting to prevent this? > You could disable pg_stat_statements.track_utility, but it obviously > means that all utility statements will be ignored, not only COPY.