- Notifications
You must be signed in to change notification settings - Fork5
Commit3114cb6
committed
Don't advance checkPoint.nextXid near the end of a checkpoint sequence.
This reverts commitc111306 in favor ofactually fixing the problem: namely, that we should never have beenmodifying the checkpoint record's nextXid at this point to begin with.The nextXid should match the state as of the checkpoint's logical WALposition (ie the redo point), not the state as of its physical position.It's especially bogus to advance it in some wal_levels and not others.In any case there is no need for the checkpoint record to carry thesame nextXid shown in the XLOG_RUNNING_XACTS record just emitted byLogStandbySnapshot, as any replay operation will already have adoptedthat value as current.This fixes bug #7710 from Tarvi Pillessaar, and probably also explains bug#6291 from Daniel Farina, in that if a checkpoint were in progress at theinstant of XID wraparound, the epoch bump would be lost as reported.(And, of course, these days there's at least a 50-50 chance of a checkpointbeing in progress at any given instant.)Diagnosed by me and independently by Andres Freund. Back-patch to allbranches supporting hot standby.1 parent5c11725 commit3114cb6
3 files changed
+3
-14
lines changedLines changed: 1 addition & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7119 | 7119 |
| |
7120 | 7120 |
| |
7121 | 7121 |
| |
7122 |
| - | |
7123 |
| - | |
7124 |
| - | |
7125 | 7122 |
| |
7126 | 7123 |
| |
7127 |
| - | |
7128 |
| - | |
7129 |
| - | |
7130 |
| - | |
7131 |
| - | |
7132 |
| - | |
7133 |
| - | |
| 7124 | + | |
7134 | 7125 |
| |
7135 | 7126 |
| |
7136 | 7127 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
848 | 848 |
| |
849 | 849 |
| |
850 | 850 |
| |
851 |
| - | |
| 851 | + | |
852 | 852 |
| |
853 | 853 |
| |
854 | 854 |
| |
| |||
877 | 877 |
| |
878 | 878 |
| |
879 | 879 |
| |
880 |
| - | |
881 |
| - | |
882 | 880 |
| |
883 | 881 |
| |
884 | 882 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
113 | 113 |
| |
114 | 114 |
| |
115 | 115 |
| |
116 |
| - | |
| 116 | + | |
117 | 117 |
| |
118 | 118 |
|
0 commit comments
Comments
(0)