Re: TupleDescAttr bounds checks
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-03-20T16:22:25Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.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.) regards, tom lane
Commits
-
Avoid unsafe access to negative index in a TupleDesc.
- 681a91d29d4d 17.10 landed
- 40fa04e7c851 14.23 landed
- 3c7a6bbe63e2 16.14 landed
- 11c2c0cc8d7c 18.4 landed
- 07e833e3cff3 15.18 landed
-
Disallow system columns in COPY FROM WHERE conditions.
- 21c69dc73f9d 19 (unreleased) landed
-
Add a test for creating an index on a whole-row expression.
- 4647ee2da37c 19 (unreleased) landed
-
Bounds-check access to TupleDescAttr with an Assert.
- c98ad086ad9b 19 (unreleased) landed
-
Prevent spurious "indexes on virtual generated columns are not supported".
- 570e2fcc041a 19 (unreleased) landed
- cceb9c18a50b 18.4 landed