Re: Server crash when describing a FETCH statement after its cursor is closed - Mailing list pgsql-hackers

From Dirkjan Bussink
Subject Re: Server crash when describing a FETCH statement after its cursor is closed
Date
Msg-id 7E0B8F9A-063B-4CBE-91C2-D986EDD8B45B@gmail.com
Whole thread
In response to Re: Server crash when describing a FETCH statement after its cursor is closed  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

> On 25 Sep 2026, at 16:33, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> I'm not convinced by this blithe assertion "not our business to raise
> error".  The adjacent case for ExecuteStmt *will* raise an error if
> it can't find the prepared statement; why shouldn't this case act like
> that one?  IOW, the sequence of client operations that you show is
> invalid, and I think we ought to push back on that accordingly.

Alright, here is a patch that now explicit returns an error when the portal
is already closed, matching what ExecuteStmt does.

-- 
Cheers,

Dirkjan


Attachment

pgsql-hackers by date:

Previous
From: Nikhil Kumar Veldanda
Date:
Subject: Re: ZSTD TOAST compression, and an extensible compression method encoding
Next
From: Dilip Kumar
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication