Re: [HACKERS] Bogus WAL segments archived after promotion

2015-04-22 Thread Michael Paquier
On Mon, Apr 13, 2015 at 11:57 PM, Heikki Linnakangas wrote: > On 04/01/2015 07:12 PM, Bruce Momjian wrote: >> >> On Fri, Dec 19, 2014 at 10:26:34PM +0200, Heikki Linnakangas wrote: >>> >>> On 12/19/2014 02:55 PM, Heikki Linnakangas wrote: I'm thinking that we should add a step to promoti

Re: [HACKERS] Bogus WAL segments archived after promotion

2015-04-13 Thread Heikki Linnakangas
On 04/01/2015 07:12 PM, Bruce Momjian wrote: On Fri, Dec 19, 2014 at 10:26:34PM +0200, Heikki Linnakangas wrote: On 12/19/2014 02:55 PM, Heikki Linnakangas wrote: I'm thinking that we should add a step to promotion, where we scan pg_xlog for any segments higher than the timeline switch point, a

Re: [HACKERS] Bogus WAL segments archived after promotion

2015-04-01 Thread Bruce Momjian
On Fri, Dec 19, 2014 at 10:26:34PM +0200, Heikki Linnakangas wrote: > On 12/19/2014 02:55 PM, Heikki Linnakangas wrote: > >I'm thinking that we should add a step to promotion, where we scan > >pg_xlog for any segments higher than the timeline switch point, and > >remove them, or mark them with .don

Re: [HACKERS] Bogus WAL segments archived after promotion

2014-12-19 Thread Heikki Linnakangas
On 12/19/2014 02:55 PM, Heikki Linnakangas wrote: I'm thinking that we should add a step to promotion, where we scan pg_xlog for any segments higher than the timeline switch point, and remove them, or mark them with .done so that they are not archived. There might be some real WAL that was stream

[HACKERS] Bogus WAL segments archived after promotion

2014-12-19 Thread Heikki Linnakangas
When streaming replication was introduced in 9.0, we started to recycle old WAL segments in archive recovery, like we do during normal operation. The WAL segments are recycled on the current timeline. There is no guarantee that they are useful, if the current timeline changes, because we step t