forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1532599
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 parent3e8c92c commit1532599
1 file changed
+8
-0
lines changedLines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3982 | 3982 |
| |
3983 | 3983 |
| |
3984 | 3984 |
| |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
| 3988 | + | |
| 3989 | + | |
| 3990 | + | |
| 3991 | + | |
| 3992 | + | |
3985 | 3993 |
| |
3986 | 3994 |
| |
3987 | 3995 |
| |
|
0 commit comments
Comments
(0)