Re: BUG #18499: Reindexing spgist index concurrently triggers Assert("TransactionIdIsValid(state->myXid)")
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2024-06-16T22:52:52Z
Lists: pgsql-bugs
I wrote: > So I conclude that we basically just need to remove the failing > assertion in spgFormDeadTuple and instead add a guard for invalid > xid in vacuumRedirectAndPlaceholder. BTW, a different line of attack could be to not generate redirects at all during REINDEX CONCURRENTLY: on the basis of this argument, we don't need them. So that would look roughly similar to the tests that skip making redirects when isBuild is true, and it'd allow keeping the assertion in spgFormDeadTuple, and it'd save some usually-trifling amount of work in the next VACUUM. However, I'm not sure there's a nice way for spginsert() to know whether it's being invoked in REINDEX CONCURRENTLY or a normal INSERT/UPDATE query. Can we trust indexInfo->ii_Concurrent for that? regards, tom lane
Commits
-
Fix insertion of SP-GiST REDIRECT tuples during REINDEX CONCURRENTLY.
- f55083319323 15.8 landed
- e4a55378f726 14.13 landed
- 92c49d1062f7 17.0 landed
- 507a900ad32c 13.16 landed
- 3e3e2ebea79c 12.20 landed
- 06f81fed3cdd 16.4 landed