forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc87aff0
committed
amcheck: Generalize one of the recently-added update chain checks.
Commitbbc1376 checked that ifa redirected line pointer pointed to a tuple, the tuple should bemarked both HEAP_ONLY_TUPLE and HEAP_UPDATED. But Andres Freundpointed out that *any* tuple that is marked HEAP_ONLY_TUPLE shouldbe marked HEAP_UPDATED, not just one that is the target of aredirected line pointer. Do that instead.To see why this is better, consider a redirect line pointer Awhich points to a heap-only tuple B which points (via CTID)to another heap-only tuple C. With the old code, we'd complainif B was not marked HEAP_UPDATED, but with this change, we'llcomplain if either B or C is not marked HEAP_UPDATED.(Note that, with or without this commit, if either B or C werenot marked HEAP_ONLY_TUPLE, we would also complain about that.)Discussion:http://postgr.es/m/CA%2BTgmobLypZx%3DcOH%2ByY1GZmCruaoucHm77A6y_-Bo%3Dh-_3H28g%40mail.gmail.com1 parent80d5e3a commitc87aff0
File tree
2 files changed
+14
-17
lines changed- contrib/amcheck
- src/bin/pg_amcheck/t
2 files changed
+14
-17
lines changedLines changed: 9 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
624 | 624 |
| |
625 | 625 |
| |
626 | 626 |
| |
627 |
| - | |
628 |
| - | |
629 |
| - | |
630 |
| - | |
631 |
| - | |
632 |
| - | |
633 |
| - | |
634 |
| - | |
635 |
| - | |
636 |
| - | |
637 |
| - | |
638 | 627 |
| |
639 | 628 |
| |
640 | 629 |
| |
| |||
954 | 943 |
| |
955 | 944 |
| |
956 | 945 |
| |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
957 | 955 |
| |
958 | 956 |
| |
959 | 957 |
| |
|
Lines changed: 5 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
617 | 617 |
| |
618 | 618 |
| |
619 | 619 |
| |
620 |
| - | |
| 620 | + | |
621 | 621 |
| |
622 | 622 |
| |
623 | 623 |
| |
624 |
| - | |
625 |
| - | |
626 | 624 |
| |
627 | 625 |
| |
628 | 626 |
| |
| |||
637 | 635 |
| |
638 | 636 |
| |
639 | 637 |
| |
640 |
| - | |
641 |
| - | |
| 638 | + | |
| 639 | + | |
642 | 640 |
| |
643 |
| - | |
644 | 641 |
| |
645 | 642 |
| |
646 | 643 |
| |
| |||
688 | 685 |
| |
689 | 686 |
| |
690 | 687 |
| |
| 688 | + | |
| 689 | + | |
691 | 690 |
| |
692 | 691 |
| |
693 | 692 |
| |
|
0 commit comments
Comments
(0)