Re: Support prepared statement invalidation when result types change - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: Support prepared statement invalidation when result types change
Date
Msg-id CAGECzQQjOzDHg46KAjnJm95i7G4qAi9y4TbFJELzOv4o4-PG=g@mail.gmail.com
Whole thread Raw
In response to Re: Support prepared statement invalidation when result types change  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 24 Jul 2024 at 17:39, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > This patch starts to allow a prepared statement to continue to work even
> > when the result type changes.
>
> What this is is a wire protocol break.

Yeah that's what I realised as well in my latest email. I withdrew
this patch from the commitfest now to reflect that. Until we get the
logic for protocol bumps in:

https://www.postgresql.org/message-id/flat/CAGECzQQPQO9K1YeBKe%2BE8yfpeG15cZGd3bAHexJ%2B6dpLP-6jWw%40mail.gmail.com#2386179bc970ebaf1786501f687a7bb2

> What if the client has
> previously done a Describe Statement on the prepared statement?
> We have no mechanism for notifying it that that information is
> now falsified.  The error is thrown to prevent us from getting
> into a situation where we'd need to do that.

However, this makes me think of an intermediary solution. In some
sense it's only really a protocol break if the result type changes
between the last Describe and the current Execute. So would it be okay
if a Describe triggers the proposed invalidation?



pgsql-hackers by date:

Previous
From: wenhui qiu
Date:
Subject: Re: Can we rely on the ordering of paths in pathlist?
Next
From: Michael Paquier
Date:
Subject: Re: PG buildfarm member cisticola