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 1lVeWg-00058v-Ch for pgsql-general@arkaria.postgresql.org; Sun, 11 Apr 2021 18:09:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lVeWf-0001xI-AF for pgsql-general@arkaria.postgresql.org; Sun, 11 Apr 2021 18:09:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVeWf-0001xB-2h for pgsql-general@lists.postgresql.org; Sun, 11 Apr 2021 18:09:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVeWd-0001On-6l for pgsql-general@postgresql.org; Sun, 11 Apr 2021 18:09:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 13BI9WsS2692337; Sun, 11 Apr 2021 14:09:33 -0400 From: Tom Lane To: "Abraham, Danny" cc: "pgsql-general@postgresql.org" Subject: Re: Reuse of REF Cursor In-reply-to: References: <2671626.1618154631@sss.pgh.pa.us> <2691494.1618163401@sss.pgh.pa.us> Comments: In-reply-to "Abraham, Danny" message dated "Sun, 11 Apr 2021 18:02:37 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2692335.1618164572.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 11 Apr 2021 14:09:32 -0400 Message-ID: <2692336.1618164572@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Abraham, Danny" writes: > 2021-04-09 08:00:08.692 IDTERROR: canceling statement due to statement = timeout I don't know why you would think that a statement timeout is somehow the fault of the refcursor variable you used. You need to look at whether your timeout is a sane value, and if so, why it is that something else is blocking your query for longer than that. Looking into pg_locks might help identify what the "something else" is. regards, tom lane