- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit632ae68
committed
Forget about targeting catalog cache invalidations by tuple TID.
The TID isn't stable enough: we might queue an sinval event before a VACUUMFULL, and then process it afterwards, when the target tuple no longer hasthe same TID. So we must invalidate entries on the basis of hash valueonly. The old coding can be shown to result in various bizarre,hard-to-reproduce errors in the presence of concurrent VACUUM FULLs onsystem catalogs, and could easily result in permanent catalog corruption,up to and including complete loss of tables.This commit is just a minimal fix that removes the unsafe comparison.We should remove transmission of the tuple TID from sinval messagesaltogether, and then arrange to suppress the extra message in the commoncase of a heap_update that doesn't change the key hashvalue. But that'sgoing to be much more invasive, and will only produce a probably-marginalperformance gain, so it doesn't seem like material for a back-patch.Back-patch to 9.0. Before that, VACUUM FULL refused to do any tuple movingif it found any INSERT_IN_PROGRESS or DELETE_IN_PROGRESS tuples (andCLUSTER would give up altogether), so there was no risk of moving a tuplethat might be the subject of an unsent sinval message.1 parentf4d7f1a commit632ae68
1 file changed
+14
-21
lines changedLines changed: 14 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
423 | 423 |
| |
424 | 424 |
| |
425 | 425 |
| |
426 |
| - | |
427 |
| - | |
428 |
| - | |
429 |
| - | |
430 |
| - | |
431 |
| - | |
| 426 | + | |
432 | 427 |
| |
433 |
| - | |
434 |
| - | |
435 |
| - | |
436 |
| - | |
437 |
| - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
438 | 439 |
| |
439 | 440 |
| |
440 | 441 |
| |
| |||
496 | 497 |
| |
497 | 498 |
| |
498 | 499 |
| |
499 |
| - | |
500 |
| - | |
501 |
| - | |
502 |
| - | |
503 |
| - | |
| 500 | + | |
504 | 501 |
| |
505 | 502 |
| |
506 | 503 |
| |
| |||
695 | 692 |
| |
696 | 693 |
| |
697 | 694 |
| |
698 |
| - | |
699 |
| - | |
700 |
| - | |
701 |
| - | |
702 | 695 |
| |
703 |
| - | |
| 696 | + | |
704 | 697 |
| |
705 | 698 |
| |
706 | 699 |
| |
|
0 commit comments
Comments
(0)