Re: 'ERROR: attempted to update invisible tuple' from 'ALTER INDEX ... ATTACH PARTITION' on parent index
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Shruthi Gowda <gowdashru@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>,
Michael Paquier <michael@paquier.xyz>, PostgreSQL Development <pgsql-hackers@postgresql.org>
Date: 2023-07-12T20:02:23Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add indisreplident to fields refreshed by RelationReloadIndexInfo()
- db9813819fe8 11.21 landed
- 7d27493b74c5 12.16 landed
- bdaaf1bf1d90 13.12 landed
- 7af65523ab8b 14.9 landed
- eb3abec4b67d 15.4 landed
- 27da47122075 16.0 landed
- a5ea825f958c 17.0 landed
-
Fix updates of indisvalid for partitioned indexes
- ed2b58c153bc 11.21 landed
- f1d6bcdd8fb5 12.16 landed
- c89d74c18b50 13.12 landed
- 954cc2139c03 14.9 landed
- c0dc97c7bfd1 15.4 landed
- 31f9d41d625d 16.0 landed
- 38ea6aa90e61 17.0 landed
On Wed, Jul 12, 2023 at 12:28 PM Shruthi Gowda <gowdashru@gmail.com> wrote: > I reviewed the function RelationReloadIndexInfo() and observed that the 'indisreplident' field and the SelfItemPointer 't_self' are not refreshed to the pg_index tuple of the index. > Attached is the patch that fixes the above issue. Oh, interesting. The fact that indisreplident isn't copied seems like a pretty clear mistake, but I'm guessing that the fact that t_self wasn't refreshed was deliberate and that the author of this code didn't really intend for callers to look at the t_self value. We could change our mind about whether that ought to be allowed, though. But, like, none of the other tuple header fields are copied either... xmax, xvac, infomask, etc. -- Robert Haas EDB: http://www.enterprisedb.com