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 1gvUMB-0004x0-58 for pgsql-general@arkaria.postgresql.org; Sun, 17 Feb 2019 21:52:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gvUM9-0002VK-R3 for pgsql-general@arkaria.postgresql.org; Sun, 17 Feb 2019 21:52:13 +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 1gvUM9-0002VD-JB for pgsql-general@lists.postgresql.org; Sun, 17 Feb 2019 21:52:13 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gvUM5-0005cn-M9 for pgsql-general@postgresql.org; Sun, 17 Feb 2019 21:52:12 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id DD42112140785 for ; Sun, 17 Feb 2019 14:52:07 -0700 (MST) Date: Sun, 17 Feb 2019 14:52:07 -0700 (MST) From: legrand legrand To: pgsql-general@postgresql.org Message-ID: <1550440327871-0.post@n3.nabble.com> Subject: pg_stat_statements doesn't track commit from pl/pgsql blocks MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, It seems that pgss doesn't track commit (nor rollback) commands from pl/pgsql blocks. using psql in version 11.1: select pg_stat_statements_reset(); do $$ begin commit; end $$; select calls,query from pg_stat_statements; ... I don't know how difficult it would be to fix it, but this could help in trouble shouting. Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html