forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4d894b4
committed
Change the order that pg_xlog and WAL archive are polled for WAL segments.
If there is a WAL segment with same ID but different TLI present in boththe WAL archive and pg_xlog, prefer the one with higher TLI. Before thispatch, the archive was polled first, for all expected TLIs, and only if nofile was found was pg_xlog scanned. This was a change in behavior from 9.3,which first scanned archive and pg_xlog for the highest TLI, then archiveand pg_xlog for the next highest TLI and so forth. This patch reverts thebehavior back to what it was in 9.2.The reason for this is that if for example you try to do archive recoveryto timeline 2, which branched off timeline 1, but the WAL for timeline 2 isnot archived yet, we would replay past the timeline switch point ontimeline 1 using the archived files, before even looking timeline 2's filesin pg_xlogReport and patch by Kyotaro Horiguchi. Backpatch to 9.3 where the behaviorwas changed.1 parent0f2ca00 commit4d894b4
1 file changed
+10
-13
lines changedLines changed: 10 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11006 | 11006 |
| |
11007 | 11007 |
| |
11008 | 11008 |
| |
11009 |
| - | |
11010 |
| - | |
11011 |
| - | |
11012 |
| - | |
11013 |
| - | |
11014 |
| - | |
| 11009 | + | |
| 11010 | + | |
| 11011 | + | |
| 11012 | + | |
| 11013 | + | |
| 11014 | + | |
11015 | 11015 |
| |
11016 | 11016 |
| |
11017 |
| - | |
11018 |
| - | |
11019 |
| - | |
| 11017 | + | |
11020 | 11018 |
| |
11021 | 11019 |
| |
11022 | 11020 |
| |
| |||
11044 | 11042 |
| |
11045 | 11043 |
| |
11046 | 11044 |
| |
11047 |
| - | |
11048 |
| - | |
11049 |
| - | |
11050 | 11045 |
| |
11051 | 11046 |
| |
11052 | 11047 |
| |
| |||
11212 | 11207 |
| |
11213 | 11208 |
| |
11214 | 11209 |
| |
11215 |
| - | |
| 11210 | + | |
| 11211 | + | |
| 11212 | + | |
11216 | 11213 |
| |
11217 | 11214 |
| |
11218 | 11215 |
| |
|
0 commit comments
Comments
(0)