Re: statement_timeout vs DECLARE CURSOR - Mailing list pgsql-general

From Tom Lane
Subject Re: statement_timeout vs DECLARE CURSOR
Date
Msg-id 2767393.1632771639@sss.pgh.pa.us
Whole thread Raw
In response to Re: statement_timeout vs DECLARE CURSOR  (Christophe Pettus <xof@thebuild.com>)
Responses Re: statement_timeout vs DECLARE CURSOR  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Christophe Pettus <xof@thebuild.com> writes:
>> On Sep 27, 2021, at 10:42, Christophe Pettus <xof@thebuild.com> wrote:
>> We've encountered some unexpected behavior with statement_timeout not cancelling a query in DECLARE CURSOR, but only
ifthe DECLARE CURSOR is outside of a transaction: 

> A bit more poking revealed the reason: The ON HOLD cursor's query is executed at commit time (which is, logically,
notinterruptible), but that's all wrapped in the single statement outside of a transaction. 

Hmm ... seems like a bit of a UX failure.  I wonder why we don't persist
such cursors before we get into the uninterruptible part of COMMIT.

            regards, tom lane



pgsql-general by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: statement_timeout vs DECLARE CURSOR
Next
From: Raymond Brinzer
Date:
Subject: Nested Schemata, in a Standard-Compliant Way?