Re: 'ERROR: attempted to update invisible tuple' from 'ALTER INDEX ... ATTACH PARTITION' on parent index
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Shruthi Gowda <gowdashru@gmail.com>, PostgreSQL Development <pgsql-hackers@postgresql.org>
Date: 2023-07-13T05:26:42Z
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 Thu, Jul 13, 2023 at 09:35:17AM +0530, Dilip Kumar wrote: > Yeah, It seems that using pg_index tuples from relcache is not safe, > at least for updating the catalog tuples. However, are there known > rules or do we need to add some comments saying that the pg_index > tuple from the relcache cannot be used to update the catalog tuple? I don't recall an implied rule written in the tree about that, on top of my mind. Perhaps something about that could be done around the declaration of RelationData in rel.h, for instance. > Or do we actually need to update all the tuple header information as > well in RelationReloadIndexInfo() in order to fix that invariant so > that it can be used for catalog tuple updates as well? RelationReloadIndexInfo() is designed to be minimal, so I am not really excited about extending it more than necessary without a case in favor of it. indisreplident is clearly on the list of things to update in this concept. The others would need a more careful evaluation, though we don't really have a case for doing more, IMO, particularly in the score of stable branches. -- Michael