forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit949e2e7
committed
amcheck: Fix a few bugs in new update chain validation.
We shouldn't set successor[whatever] to an offset number that is lessthan FirstOffsetNumber or more than maxoff. We already avoided thatfor redirects, but not for CTID links. Allowing bad offset numbersinto the successor[] array causes core dumps.We shouldn't use HeapTupleHeaderIsHotUpdated() because it checksstuff other than the status of the infomask2 bit HEAP_HOT_UPDATED.We only care about the status of that bit, not the other stuffthat HeapTupleHeaderIsHotUpdated() checks. This mistake can causeverify_heapam() to report corruption when none is present.The first hunk of this patch was written by me. The other two werewritten by Andres Freund. This could probably do with more reviewbefore commit, but I'd like to try to get the buildfarm green againsooner rather than later.Discussion:http://postgr.es/m/20230322204552.s6cv3ybqkklhhybb@awork3.anarazel.de1 parentdccef0f commit949e2e7
1 file changed
+7
-3
lines changedLines changed: 7 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
543 | 543 |
| |
544 | 544 |
| |
545 | 545 |
| |
546 |
| - | |
| 546 | + | |
| 547 | + | |
547 | 548 |
| |
548 | 549 |
| |
549 | 550 |
| |
| |||
665 | 666 |
| |
666 | 667 |
| |
667 | 668 |
| |
| 669 | + | |
| 670 | + | |
| 671 | + | |
668 | 672 |
| |
669 |
| - | |
| 673 | + | |
670 | 674 |
| |
671 | 675 |
| |
672 | 676 |
| |
673 | 677 |
| |
674 | 678 |
| |
675 | 679 |
| |
676 |
| - | |
| 680 | + | |
677 | 681 |
| |
678 | 682 |
| |
679 | 683 |
| |
|
0 commit comments
Comments
(0)