From: Julien Rouhaud <rjuju123@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Bryn Llewellyn <bryn@yugabyte.com>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: Unexpected result from ALTER FUNCTION— looks like a bug
Date: Wed, 20 Apr 2022 11:14:31 +0800
Message-ID: <Yl96l0Ay/F8uq4u9@jrouhaud> (raw)
In-Reply-To: <2713499.1650423990@sss.pgh.pa.us>
References: <8AC9A37F-99BD-446F-A2F7-B89AD0022774@yugabyte.com>
<CAKFQuwa6WXVmjJRuDvN=B0Qv1BoLEKPiimXQ3HBJbRMwjS0g+Q@mail.gmail.com>
<20220420024707.zvhpbr5ztermdmm6@jrouhaud>
<20220420024903.j25vrhfqtfi6zkzt@jrouhaud>
<2713499.1650423990@sss.pgh.pa.us>
On Tue, Apr 19, 2022 at 11:06:30PM -0400, Tom Lane wrote:
> Julien Rouhaud <rjuju123@gmail.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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: rjuju123@gmail.com, tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, bryn@yugabyte.com
Subject: Re: Unexpected result from ALTER FUNCTION— looks like a bug
In-Reply-To: <Yl96l0Ay/F8uq4u9@jrouhaud>
References: <8AC9A37F-99BD-446F-A2F7-B89AD0022774@yugabyte.com> <CAKFQuwa6WXVmjJRuDvN=B0Qv1BoLEKPiimXQ3HBJbRMwjS0g+Q@mail.gmail.com> <20220420024707.zvhpbr5ztermdmm6@jrouhaud> <20220420024903.j25vrhfqtfi6zkzt@jrouhaud> <2713499.1650423990@sss.pgh.pa.us> <Yl96l0Ay/F8uq4u9@jrouhaud>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox