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

From Tom Lane
Subject Re: Server crash when describing a FETCH statement after its cursor is closed
Date
Msg-id 1881624.1790346792@sss.pgh.pa.us
Whole thread
In response to Server crash when describing a FETCH statement after its cursor is closed  (Dirkjan Bussink <d.bussink@gmail.com>)
Responses Re: Server crash when describing a FETCH statement after its cursor is closed
Re: Server crash when describing a FETCH statement after its cursor is closed
List pgsql-hackers
Dirkjan Bussink <d.bussink@gmail.com> writes:
> The following extended-protocol sequence crashes a backend (SIGSEGV
> in production builds, assertion failure in assert-enabled ones), and
> the postmaster terminates all other sessions for crash recovery:

Thanks for the report.

> The attached patch replaces the Assert with a runtime check returning
> NIL, mirroring the guard in UtilityTupleDescriptor(). A regression
> test is included.

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.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Up to 50x degradation in dblink performance when receiving notice traffic 19 vs 18
Next
From: Shlok Kyal
Date:
Subject: Re: Support EXCEPT for ALL SEQUENCES publications