Re: Unexpected result from ALTER FUNCTION— looks like a bug

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Bryn Llewellyn <bryn(at)yugabyte(dot)com>, pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Unexpected result from ALTER FUNCTION— looks like a bug
Date: 2022-04-20 03:14:31
Message-ID: Yl96l0Ay/F8uq4u9@jrouhaud
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Apr 19, 2022 at 11:06:30PM -0400, Tom Lane wrote:
> Julien Rouhaud <rjuju123(at)gmail(dot)com> writes:
> > On Wed, Apr 20, 2022 at 10:47:07AM +0800, Julien Rouhaud wrote:
> >>
> >> AFAICT the problem is that SET / RESET part is messing with the
> >> HeapTuple, so you can't use the procForm reference afterwards. Simply
> >> processing parallel_item before set_items fixes the problem, as in the
> >> attached.
>
> > This time with the file.
>
> Yeah, I arrived at the same fix. Another possibility would be to
> make the procForm pointer valid again after heap_modify_tuple,
> but that seemed like it'd add more code for no really good reason.

Yeah I agree. The comment you added seems enough as a future-proof security.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2022-04-20 03:15:18 Re: Unexpected result from ALTER FUNCTION— looks like a bug
Previous Message Tom Lane 2022-04-20 03:06:30 Re: Unexpected result from ALTER FUNCTION— looks like a bug