forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit568995b
committed
Avoid emitting a bogus WAL record when recycling an all-zero btree page.
Commitfafa374 caused _bt_getbuf() to possibly emit a WAL record fora page that it was about to recycle. However, it failed to distinguishall-zero pages from dead pages, which is important because only thelatter have valid btpo.xact values, or indeed any special space at all.Recycling an all-zero page with XLogStandbyInfoActive() enabled thereforeled to an Assert failure, or to emission of a WAL record containing abogus cutoff XID, which might lead to unnecessary query cancellationson hot standby servers.Per reports from Antonin Houska and 自己. Amit Kapila was first topropose this fix, and Robert Haas, myself, and Kyotaro Horiguchireviewed it at various times.This is an old bug, so back-patch to all supported branches.Discussion:https://postgr.es/m/2628.1474272158@localhostDiscussion:https://postgr.es/m/48875502.f4a0.1635f0c27b0.Coremail.zoulx1982@163.com1 parentccc286d commit568995b
1 file changed
+11
-3
lines changedLines changed: 11 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
622 | 622 |
| |
623 | 623 |
| |
624 | 624 |
| |
625 |
| - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
626 | 630 |
| |
627 |
| - | |
| 631 | + | |
| 632 | + | |
628 | 633 |
| |
629 | 634 |
| |
630 | 635 |
| |
| |||
737 | 742 |
| |
738 | 743 |
| |
739 | 744 |
| |
740 |
| - | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
741 | 749 |
| |
742 | 750 |
| |
743 | 751 |
| |
|
0 commit comments
Comments
(0)