forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf56a9de
committed
Fix inconsistency with replay of hash squeeze record for clean buffers
aa5edbe has tweaked _hash_freeovflpage() so as the write buffer'sLSN is updated only when necessary, when REGBUF_NO_CHANGE is not used.The replay code was not consistent with that, causing the write buffer'sLSN to be updated and its page to be marked as dirty even if the bufferwas registered in a "clean" state. This was possible for the case of asqueeze record when there are no tuples to add to the write buffer, for(is_prim_bucket_same_wrt && !is_prev_bucket_same_wrt).I have performed some validation of this commit withwal_consistency_checking and a change in WAL that logs REGBUF_NO_CHANGEto a new BKPIMAGE_*. Thanks to that, it is possible to know at replayif a buffer was clean when it was registered, then cross-checked the LSNof the "clean" page copy coming from WAL with the LSN of the block oncethe record has been replayed. This eats one bit in bimg_info, which isnot acceptable to be integrated as-is, but it could become handy in thefuture. I didn't spot other areas than the one fixed by this commit atthe extent of what the main regression test suite covers.As this is an oversight inaa5edbe, no backpatch is required.Reported-by: Zubeyr EryilmazAuthor: Hayato KurodaReviewed-by: Amit Kapila, Michael PaquierDiscussion:https://postgr.es/m/ZbyVVG_7eW3YD5-A@paquier.xyz1 parent5392dd3 commitf56a9de
1 file changed
+19
-2
lines changedLines changed: 19 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
666 | 666 |
| |
667 | 667 |
| |
668 | 668 |
| |
| 669 | + | |
669 | 670 |
| |
670 | 671 |
| |
671 | 672 |
| |
| |||
695 | 696 |
| |
696 | 697 |
| |
697 | 698 |
| |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
698 | 710 |
| |
699 | 711 |
| |
700 | 712 |
| |
| |||
711 | 723 |
| |
712 | 724 |
| |
713 | 725 |
| |
| 726 | + | |
714 | 727 |
| |
715 | 728 |
| |
716 |
| - | |
717 |
| - | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
718 | 735 |
| |
719 | 736 |
| |
720 | 737 |
| |
|
0 commit comments
Comments
(0)