Commit 05e2293
committed
Fix possible pg_basebackup failure on standby with "include WAL".
If a restartpoint flushed no dirty buffers, it could fail to update
the minimum recovery point, leading to a minimum recovery point prior
to the starting REDO location. perform_base_backup() would interpret
that as meaning that no WAL files at all needed to be included in the
backup, failing an internal sanity check. To fix, have restartpoints
always update the minimum recovery point to just after the checkpoint
record itself, so that the file (or files) containing the checkpoint
record will always be included in the backup.
Code by Amit Kapila, per a design suggestion by me, with some
additional work on the code comment by me. Test case by Michael
Paquier. Report by Kyotaro Horiguchi.1 parent 445035a commit 05e2293
File tree
2 files changed
+33
-1
lines changed- src
- backend/access/transam
- test/recovery/t
2 files changed
+33
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
615 | | - | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
616 | 618 | | |
617 | 619 | | |
618 | 620 | | |
619 | 621 | | |
| 622 | + | |
620 | 623 | | |
621 | 624 | | |
622 | 625 | | |
| |||
8691 | 8694 | | |
8692 | 8695 | | |
8693 | 8696 | | |
| 8697 | + | |
8694 | 8698 | | |
8695 | 8699 | | |
8696 | 8700 | | |
| |||
8710 | 8714 | | |
8711 | 8715 | | |
8712 | 8716 | | |
| 8717 | + | |
8713 | 8718 | | |
8714 | 8719 | | |
8715 | 8720 | | |
| |||
8723 | 8728 | | |
8724 | 8729 | | |
8725 | 8730 | | |
| 8731 | + | |
8726 | 8732 | | |
8727 | 8733 | | |
8728 | 8734 | | |
| |||
8826 | 8832 | | |
8827 | 8833 | | |
8828 | 8834 | | |
| 8835 | + | |
| 8836 | + | |
| 8837 | + | |
| 8838 | + | |
| 8839 | + | |
| 8840 | + | |
| 8841 | + | |
| 8842 | + | |
| 8843 | + | |
| 8844 | + | |
| 8845 | + | |
| 8846 | + | |
| 8847 | + | |
| 8848 | + | |
| 8849 | + | |
| 8850 | + | |
| 8851 | + | |
| 8852 | + | |
| 8853 | + | |
| 8854 | + | |
| 8855 | + | |
8829 | 8856 | | |
8830 | 8857 | | |
8831 | 8858 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
0 commit comments