Re: [HACKERS] pg_basebackup from cascading standby after timeline switch

2013-01-02 Thread Greg Stark
On Wed, Jan 2, 2013 at 1:55 PM, Heikki Linnakangas wrote: > If you take a backup with "pg_basebackup -X fetch", and the timeline > switches while the backup is taken, you currently get an error like > "requested WAL segment 0001000C has already been removed". > To fix, let's change

Re: [HACKERS] pg_basebackup from cascading standby after timeline switch

2013-01-02 Thread Heikki Linnakangas
On 27.12.2012 12:06, Heikki Linnakangas wrote: On 23.12.2012 15:33, Fujii Masao wrote: On Fri, Dec 21, 2012 at 9:54 PM, Heikki Linnakangas wrote: Yes, this should be backpatched to 9.2. I came up with the attached. In this patch, if '-X stream' is specified in pg_basebackup, the timeline his

Re: [HACKERS] pg_basebackup from cascading standby after timeline switch

2012-12-27 Thread Heikki Linnakangas
On 23.12.2012 15:33, Fujii Masao wrote: On Fri, Dec 21, 2012 at 9:54 PM, Heikki Linnakangas wrote: Yes, this should be backpatched to 9.2. I came up with the attached. In this patch, if '-X stream' is specified in pg_basebackup, the timeline history files are not backed up. Good point. W

Re: [HACKERS] pg_basebackup from cascading standby after timeline switch

2012-12-23 Thread Fujii Masao
On Fri, Dec 21, 2012 at 9:54 PM, Heikki Linnakangas wrote: > Yes, this should be backpatched to 9.2. I came up with the attached. In this patch, if '-X stream' is specified in pg_basebackup, the timeline history files are not backed up. We should change pg_backup background process and walsender

Re: [HACKERS] pg_basebackup from cascading standby after timeline switch

2012-12-21 Thread Amit kapila
On Friday, December 21, 2012 6:24 PM Heikki Linnakangas wrote: On 17.12.2012 18:58, Magnus Hagander wrote: > On Mon, Dec 17, 2012 at 5:19 PM, Tom Lane wrote: >> Heikki Linnakangas writes: I'm not happy with the fact that we just ignore the problem in a backup taken from a standby, silen

Re: [HACKERS] pg_basebackup from cascading standby after timeline switch

2012-12-21 Thread Heikki Linnakangas
On 17.12.2012 18:58, Magnus Hagander wrote: On Mon, Dec 17, 2012 at 5:19 PM, Tom Lane wrote: Heikki Linnakangas writes: I'm not happy with the fact that we just ignore the problem in a backup taken from a standby, silently giving the user a backup that won't start up. Why not include the time

Re: [HACKERS] pg_basebackup from cascading standby after timeline switch

2012-12-18 Thread Tom Lane
Fujii Masao writes: > On Tue, Dec 18, 2012 at 8:09 PM, Simon Riggs wrote: >> What I'm saying is that the new history file is created from the old >> one, so the latest file includes all the history as a direct copy. The >> only thing new is one line of information. > The timeline history file in

Re: [HACKERS] pg_basebackup from cascading standby after timeline switch

2012-12-18 Thread Fujii Masao
On Tue, Dec 18, 2012 at 8:09 PM, Simon Riggs wrote: > On 18 December 2012 00:53, Tom Lane wrote: >> Simon Riggs writes: >>> On 17 December 2012 14:16, Heikki Linnakangas >>> wrote: I also wonder if pg_basebackup should include *all* timeline history files in the backup, not just the

Re: [HACKERS] pg_basebackup from cascading standby after timeline switch

2012-12-18 Thread Simon Riggs
On 18 December 2012 00:53, Tom Lane wrote: > Simon Riggs writes: >> On 17 December 2012 14:16, Heikki Linnakangas >> wrote: >>> I also wonder if pg_basebackup should >>> include *all* timeline history files in the backup, not just the latest one >>> strictly required to restore. > >> Why? the t

Re: [HACKERS] pg_basebackup from cascading standby after timeline switch

2012-12-17 Thread Tom Lane
Simon Riggs writes: > On 17 December 2012 14:16, Heikki Linnakangas wrote: >> I also wonder if pg_basebackup should >> include *all* timeline history files in the backup, not just the latest one >> strictly required to restore. > Why? the timeline history file includes the previous timelines alr

Re: [HACKERS] pg_basebackup from cascading standby after timeline switch

2012-12-17 Thread Simon Riggs
On 17 December 2012 14:16, Heikki Linnakangas wrote: > I'm not happy with the fact that we just ignore the problem in a backup > taken from a standby, silently giving the user a backup that won't start up. That's spooky. I just found a different issue with prmotion during backup on your other th

Re: [HACKERS] pg_basebackup from cascading standby after timeline switch

2012-12-17 Thread Magnus Hagander
On Mon, Dec 17, 2012 at 5:19 PM, Tom Lane wrote: > Heikki Linnakangas writes: >> I'm not happy with the fact that we just ignore the problem in a backup >> taken from a standby, silently giving the user a backup that won't start >> up. Why not include the timeline history file in the backup? > >

Re: [HACKERS] pg_basebackup from cascading standby after timeline switch

2012-12-17 Thread Tom Lane
Heikki Linnakangas writes: > I'm not happy with the fact that we just ignore the problem in a backup > taken from a standby, silently giving the user a backup that won't start > up. Why not include the timeline history file in the backup? +1. I was not aware that we weren't doing that --- it s