- Notifications
You must be signed in to change notification settings - Fork4.9k
Commite7428a9
committed
Add hardening to catch invalid TIDs in indexes.
Add hardening to the heapam index tuple deletion path to catch TIDs inindex pages that point to a heap item that index tuples should neverpoint to. The corruption we're trying to catch here is particularlytricky to detect, since it typically involves "extra" (corrupt) indextuples, as opposed to the absence of required index tuples in the index.For example, a heap TID from an index page that turns out to point to anLP_UNUSED item in the heap page has a good chance of being caught by oneof the new checks. There is a decent chance that the recently fixedparallel VACUUM bug (see commit9bacec1) would have been caught hadthat particular check been in place for Postgres 14. No backpatch ofthis extra hardening for now, though.Author: Peter Geoghegan <pg@bowt.ie>Reviewed-By: Andres Freund <andres@anarazel.de>Discussion:https://postgr.es/m/CAH2-Wzk-4_raTzawWGaiqNvkpwDXxv3y1AQhQyUeHfkU=tFCeA@mail.gmail.com1 parentbabbbb5 commite7428a9
File tree
5 files changed
+76
-2
lines changed- src
- backend/access
- heap
- index
- nbtree
- include/access
5 files changed
+76
-2
lines changedLines changed: 65 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7252 | 7252 |
| |
7253 | 7253 |
| |
7254 | 7254 |
| |
| 7255 | + | |
| 7256 | + | |
| 7257 | + | |
| 7258 | + | |
| 7259 | + | |
| 7260 | + | |
| 7261 | + | |
| 7262 | + | |
| 7263 | + | |
| 7264 | + | |
| 7265 | + | |
| 7266 | + | |
| 7267 | + | |
| 7268 | + | |
| 7269 | + | |
| 7270 | + | |
| 7271 | + | |
| 7272 | + | |
| 7273 | + | |
| 7274 | + | |
| 7275 | + | |
| 7276 | + | |
| 7277 | + | |
| 7278 | + | |
| 7279 | + | |
| 7280 | + | |
| 7281 | + | |
| 7282 | + | |
| 7283 | + | |
| 7284 | + | |
| 7285 | + | |
| 7286 | + | |
| 7287 | + | |
| 7288 | + | |
| 7289 | + | |
| 7290 | + | |
| 7291 | + | |
| 7292 | + | |
| 7293 | + | |
| 7294 | + | |
| 7295 | + | |
| 7296 | + | |
| 7297 | + | |
| 7298 | + | |
| 7299 | + | |
| 7300 | + | |
| 7301 | + | |
| 7302 | + | |
| 7303 | + | |
| 7304 | + | |
| 7305 | + | |
| 7306 | + | |
| 7307 | + | |
| 7308 | + | |
| 7309 | + | |
| 7310 | + | |
| 7311 | + | |
7255 | 7312 |
| |
7256 | 7313 |
| |
7257 | 7314 |
| |
| |||
7446 | 7503 |
| |
7447 | 7504 |
| |
7448 | 7505 |
| |
| 7506 | + | |
| 7507 | + | |
| 7508 | + | |
| 7509 | + | |
| 7510 | + | |
| 7511 | + | |
| 7512 | + | |
| 7513 | + | |
7449 | 7514 |
| |
7450 | 7515 |
| |
7451 | 7516 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
303 | 303 |
| |
304 | 304 |
| |
305 | 305 |
| |
| 306 | + | |
| 307 | + | |
306 | 308 |
| |
307 | 309 |
| |
308 | 310 |
| |
| |||
312 | 314 |
| |
313 | 315 |
| |
314 | 316 |
| |
| 317 | + | |
315 | 318 |
| |
316 | 319 |
| |
317 |
| - | |
| 320 | + | |
318 | 321 |
| |
319 | 322 |
| |
320 | 323 |
| |
321 | 324 |
| |
322 | 325 |
| |
323 | 326 |
| |
324 |
| - | |
| 327 | + | |
325 | 328 |
| |
326 | 329 |
| |
327 | 330 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
348 | 348 |
| |
349 | 349 |
| |
350 | 350 |
| |
| 351 | + | |
| 352 | + | |
351 | 353 |
| |
352 | 354 |
| |
353 | 355 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2810 | 2810 |
| |
2811 | 2811 |
| |
2812 | 2812 |
| |
| 2813 | + | |
| 2814 | + | |
2813 | 2815 |
| |
2814 | 2816 |
| |
2815 | 2817 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
220 | 220 |
| |
221 | 221 |
| |
222 | 222 |
| |
| 223 | + | |
| 224 | + | |
223 | 225 |
| |
224 | 226 |
| |
225 | 227 |
| |
|
0 commit comments
Comments
(0)