- Notifications
You must be signed in to change notification settings - Fork5
Commit223431c
committed
Request XLOG switch before writing checkpoint in pg_start_backup(). Otherwise
you can end up with an unrecoverable backup if you start a new base backupright after finishing archive recovery. In that scenario, the redo pointer ofthe checkpoint that pg_start_backup() writes points to the XLOG segment wherethe timeline-changing end-of-archive-recovery checkpoint is. The beginningof that segment contains pages with the old timeline ID, and we don't acceptthat in recovery unless we find a history file covering the old timeline ID.If you omit pg_xlog from the base backup and clear the archive directorybefore starting the backup, there will be no such history file available.The bug is present in all versions since PITR was introduced in 8.0, but I'mback-patching only back to 8.2. Earlier versions didn't have XLOG switchrecords, making this fix unfeasible. Given the lack of reports until now,it doesn't seem worthwhile to spend more effort to fix 8.0 and 8.1.Per report and suggestion by Mikael Krantz1 parent1f36fec commit223431c
1 file changed
+14
-1
lines changedLines changed: 14 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
6987 | 6987 |
| |
6988 | 6988 |
| |
6989 | 6989 |
| |
| 6990 | + | |
| 6991 | + | |
| 6992 | + | |
| 6993 | + | |
| 6994 | + | |
| 6995 | + | |
| 6996 | + | |
| 6997 | + | |
| 6998 | + | |
| 6999 | + | |
| 7000 | + | |
| 7001 | + | |
| 7002 | + | |
6990 | 7003 |
| |
6991 | 7004 |
| |
6992 | 7005 |
| |
|
0 commit comments
Comments
(0)