forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite6c44ee
committed
Fix off-by-one possibly leading to skipped XLOG_RUNNING_XACTS records.
Since6ef2eba ("Skip checkpoints, archiving on idle systems."),GetLastImportantRecPtr() is used to avoid performing superfluouscheckpoints, xlog switches, running-xact records when the system isidle. Unfortunately the check concerning running-xact records had aoff-by-one error, leading to such records being potentially skippedwhen only a single record has been inserted since the lastrunning-xact record.An alternative approach would have been to changeGetLastImportantRecPtr()'s definition to point to the end of records,but that would make the checkpoint code more complicated.Author: Andres FreundDiscussion:https://postgr.es/m/20170505012447.wsrympaxnfis6ojt@alap3.anarazel.deBackpatch: no, code only present in master1 parent334b82c commite6c44ee
2 files changed
+7
-3
lines changedLines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
325 | 325 |
| |
326 | 326 |
| |
327 | 327 |
| |
328 |
| - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
329 | 332 |
| |
330 | 333 |
| |
331 |
| - | |
| 334 | + | |
332 | 335 |
| |
333 | 336 |
| |
334 | 337 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
611 | 611 |
| |
612 | 612 |
| |
613 | 613 |
| |
614 |
| - | |
| 614 | + | |
| 615 | + | |
615 | 616 |
| |
616 | 617 |
| |
617 | 618 |
| |
|
0 commit comments
Comments
(0)