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 1idyhH-0003C2-5t for pgsql-performance@arkaria.postgresql.org; Sun, 08 Dec 2019 15:42:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1idyhF-0002ee-Qd for pgsql-performance@arkaria.postgresql.org; Sun, 08 Dec 2019 15:42:09 +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 1idyhF-0002eX-HH for pgsql-performance@lists.postgresql.org; Sun, 08 Dec 2019 15:42:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1idyh9-0000vY-5R for pgsql-performance@postgresql.org; Sun, 08 Dec 2019 15:42:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xB8Fg0IP005944; Sun, 8 Dec 2019 10:42:00 -0500 From: Tom Lane To: Mariel Cherkassky cc: "MichaelDBA@sqlexec.com" , PostgreSQL mailing lists Subject: Re: query that canceled isnt logged In-reply-to: References: <3160F744-01C9-4411-B1D2-36E737D6C2E5@sqlexec.com> Comments: In-reply-to Mariel Cherkassky message dated "Sun, 08 Dec 2019 17:18:37 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5942.1575819720.1@sss.pgh.pa.us> Date: Sun, 08 Dec 2019 10:42:00 -0500 Message-ID: <5943.1575819720@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Mariel Cherkassky writes: > If I'll try to run the following query and cancel it manually(ctrl+c) : > select pg_sleep(10) > I will see in the logs the following messages : > 2019-12-08 17:16:34 IST postgres 30797 LOG: statement: select > pg_sleep(10); > 2019-12-08 17:16:36 IST postgres 30797 ERROR: canceling statement due to > user request > 2019-12-08 17:16:36 IST postgres 30797 STATEMENT: select pg_sleep(10); Note that that's going through "simple query" protocol (which is why it says "statement:") but your application is evidently using "extended query" protocol (because you see "execute ...:", at least when it's working correctly). I wonder whether the explanation is somewhere in that. The best theory I have at the moment, though, is that something is taking exclusive locks on system catalogs, blocking parsing of even trivial statements. regards, tom lane