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 1i4ag5-0001hA-8Y for pgsql-general@arkaria.postgresql.org; Mon, 02 Sep 2019 00:58:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i4ag2-0001nX-Pd for pgsql-general@arkaria.postgresql.org; Mon, 02 Sep 2019 00:58:38 +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 1i4ag2-0001nQ-GA for pgsql-general@lists.postgresql.org; Mon, 02 Sep 2019 00:58:38 +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 1i4ag0-0006gD-3P for pgsql-general@postgresql.org; Mon, 02 Sep 2019 00:58:38 +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 x820wUx5014507; Sun, 1 Sep 2019 20:58:30 -0400 From: Tom Lane To: Will Storey cc: Adrian Klaver , pgsql-general@postgresql.org Subject: Re: Unexpected "canceling statement due to user request" error In-reply-to: <20190902002120.jp4xjlfuvkwwksr3@dev.null> References: <20190816210243.tohrx52bnbxx5zra@dev.null> <34a5ea6d-8dbb-e46a-0c08-fbbea4d4bcd7@aklaver.com> <20190817181335.wc7t3z3tfs7taiqo@dev.null> <11561.1567381579@sss.pgh.pa.us> <20190902002120.jp4xjlfuvkwwksr3@dev.null> Comments: In-reply-to Will Storey message dated "Sun, 01 Sep 2019 17:21:20 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14505.1567385910.1@sss.pgh.pa.us> Date: Sun, 01 Sep 2019 20:58:30 -0400 Message-ID: <14506.1567385910@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Will Storey writes: > On Sun 2019-09-01 19:46:19 -0400, Tom Lane wrote: >> A separate question is how come the particular query you're complaining >> about has (seemingly) a fairly wide window where it never does any >> CHECK_FOR_INTERRUPTS call before terminating. Perhaps there's someplace >> we need to sprinkle a few more of those. > Yeah, it is strange. There are many queries in this system with statement > timeouts and this is the only one where I see this and it happens several > times a day. It'd be interesting to see EXPLAIN ANALYZE output from a typical execution of that query. Even better would be a test case (w/ tables and dummy data) so somebody else could reproduce it; but maybe looking at EXPLAIN ANALYZE would be enough to determine where we're missing checks. regards, tom lane