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 1fGXEA-0000rP-Q3 for pgsql-general@arkaria.postgresql.org; Wed, 09 May 2018 22:06:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fGXE7-0008Pd-Jb for pgsql-general@arkaria.postgresql.org; Wed, 09 May 2018 22:06:23 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1fGXE7-0008PT-BZ for pgsql-general@lists.postgresql.org; Wed, 09 May 2018 22:06:23 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fGXE2-0003QN-Q0 for pgsql-general@postgresql.org; Wed, 09 May 2018 22:06:22 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 4FE82CD78572 for ; Wed, 9 May 2018 15:06:16 -0700 (MST) Date: Wed, 9 May 2018 15:06:16 -0700 (MST) From: legrand legrand To: pgsql-general@postgresql.org Message-ID: <1525903576324-0.post@n3.nabble.com> In-Reply-To: <1525646770300-0.post@n3.nabble.com> References: <1524774265469-0.post@n3.nabble.com> <20180427114503.GA12829@zakirov.localdomain> <1524946656214-0.post@n3.nabble.com> <3099.1524949133@sss.pgh.pa.us> <1525018491488-0.post@n3.nabble.com> <1525646770300-0.post@n3.nabble.com> Subject: Re: pg_stat_statements : how to catch non successfully finished statements ? 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, Here is a patch that : - adds a new guc: pg_stat_statements.track_errors boolean (default to true), - capture of DML, DDL, PL/PGSQL commands in error into pgss. There is always a risk that new code used in PG_CATCH (mainly pgss_store) gives an error. I'm not able to tell when it could occur and what would be the impact ... see pgss_with_errors.patch pgss_with_errors.txt Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html