forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit09620ea
committed
Fix incorrect memory access in VACUUM FULL with invalid toast indexes
An invalid toast index is skipped in reindex_relation(). These would beremnants of a failed REINDEX CONCURRENTLY and they should never beenrebuilt as there can only be one valid toast index at a time.REINDEX_REL_SUPPRESS_INDEX_USE, used by CLUSTER and VACUUM FULL, needsto maintain a list of the indexes being processed. The list of indexesis retrieved from the relation cache, and includes invalid indexes. Thecode has missed that invalid toast indexes are ignored inreindex_relation() as this leads to a hard failure in reindex_index(),and they were left in the reindex pending list, making the listinconsistent when rechecked. The incorrect memory access was happeningwhen scanning pg_class for the refresh of pg_database.datfrozenxid, whendoing a scan of pg_class.This issue exists since REINDEX CONCURRENTLY exists, where invalid toastindexes can exist, so backpatch all the way down.Reported-by: Alexander LakhinAuthor: Tender WangDiscussion:https://postgr.es/m/18630-9aed99c38830657d@postgresql.orgBackpatch-through: 121 parentf762d99 commit09620ea
1 file changed
+8
-0
lines changedLines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4010 | 4010 |
| |
4011 | 4011 |
| |
4012 | 4012 |
| |
| 4013 | + | |
| 4014 | + | |
| 4015 | + | |
| 4016 | + | |
| 4017 | + | |
| 4018 | + | |
| 4019 | + | |
| 4020 | + | |
4013 | 4021 |
| |
4014 | 4022 |
| |
4015 | 4023 |
| |
|
0 commit comments
Comments
(0)