Re: Support prepared statement invalidation when result types change

From: Jelte Fennema-Nio <me(at)jeltef(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Support prepared statement invalidation when result types change
Date: 2024-07-25 08:30:09
Message-ID: CAGECzQQjOzDHg46KAjnJm95i7G4qAi9y4TbFJELzOv4o4-PG=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 24 Jul 2024 at 17:39, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-07-25 08:38:07 Re: PG buildfarm member cisticola
Previous Message wenhui qiu 2024-07-25 08:18:49 Re: Can we rely on the ordering of paths in pathlist?