forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit766dcfb
committed
Fix off-by-one error in calculating subtrans/multixact truncation point.
If there were no subtransactions (or multixacts) active, we would calculatethe oldestxid == next xid. That's correct, but if next XID happens to beon the next pg_subtrans (pg_multixact) page, the page does not exist yet,and SimpleLruTruncate will produce an "apparent wraparound" warning. Thewarning is harmless in this case, but looks very alarming to users.Backpatch to all supported versions. Patch and analysis by Thomas Munro.1 parent46d0a9b commit766dcfb
2 files changed
+16
-4
lines changedLines changed: 10 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
| 176 | + | |
| 177 | + | |
176 | 178 |
| |
177 | 179 |
| |
178 | 180 |
| |
| |||
3057 | 3059 |
| |
3058 | 3060 |
| |
3059 | 3061 |
| |
3060 |
| - | |
| 3062 | + | |
| 3063 | + | |
| 3064 | + | |
| 3065 | + | |
| 3066 | + | |
| 3067 | + | |
| 3068 | + | |
3061 | 3069 |
| |
3062 |
| - | |
3063 |
| - | |
| 3070 | + | |
3064 | 3071 |
| |
3065 | 3072 |
| |
3066 | 3073 |
| |
|
Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
340 | 340 |
| |
341 | 341 |
| |
342 | 342 |
| |
343 |
| - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
344 | 348 |
| |
| 349 | + | |
345 | 350 |
| |
346 | 351 |
| |
347 | 352 |
| |
|
0 commit comments
Comments
(0)