Re: TupleDescAttr bounds checks

From: Robert Haas <robertmhaas(at)gmail(dot)com>
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: TupleDescAttr bounds checks
Date: 2026-03-20 16:28:39
Message-ID: CA+TgmoaiPqnV2ePY-DyQUVGnK5sJ5ryPCDYpn_+1Ua4JwfoqRw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 20, 2026 at 12:22 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > Scrutiny of a recent test_plan_advice failure in the buildfarm
> > revealed a bug that had nothing to do with test_plan_advice or
> > pg_plan_advice; rather, it was a bug introduced by the virtual
> > generated columns feature, and specifically of that feature indexing
> > off of the beginning of a TupleDesc when whole-row attributes are
> > present. The first patch attached to this email fixes this issue, and
> > should be committed and back-patched to v18. I plan to do that soon
> > unless there are objections.
>
> I had just come to the same conclusion about why grison is failing.
> +1 to all three of these patches. (I did not look to see if 0002
> fixes every case that the Assert could trigger on, but as long as
> you're only putting it in HEAD I'm not too concerned that we might
> have missed some.)

Hmm, I had a rougher version of this analysis (and an analysis of some
the other failures) on an email I sent yesterday on the pg_plan_advice
thread. Based on this email and another one you sent, I'm guessing you
either didn't see that email or maybe even didn't get a copy of it for
some reason.

Or maybe you just mean that you were checking over my analysis, but
just in case:

https://www.postgresql.org/message-id/CA%2BTgmoZUN8FT1Ah%3Dm6Uis5bHa4FUa%2B_hMDWtcABG17toEfpiUg%40mail.gmail.com

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2026-03-20 16:38:44 Re: pg_get__*_ddl consolidation
Previous Message Andres Freund 2026-03-20 16:27:49 Re: Fixes inconsistent behavior in vacuum when it processes multiple relations