forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita613edc
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 parent3981fd5 commita613edc
1 file changed
+8
-0
lines changedLines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3954 | 3954 |
| |
3955 | 3955 |
| |
3956 | 3956 |
| |
| 3957 | + | |
| 3958 | + | |
| 3959 | + | |
| 3960 | + | |
| 3961 | + | |
| 3962 | + | |
| 3963 | + | |
| 3964 | + | |
3957 | 3965 |
| |
3958 | 3966 |
| |
3959 | 3967 |
| |
|
0 commit comments
Comments
(0)