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 hlinnakan...@vmware.com wrote: Yes, this should be backpatched to 9.2. I came up with the attached. In this patch, if '-X stream' is specified in

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 hlinnakan...@vmware.com 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

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 hlinnakan...@vmware.com 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

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 hlinnakan...@vmware.com 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

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 Lanet...@sss.pgh.pa.us wrote: Heikki Linnakangashlinnakan...@vmware.com 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

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 Lanet...@sss.pgh.pa.us wrote: Heikki Linnakangashlinnakan...@vmware.com writes: I'm not happy with the fact that we just ignore the problem in a

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

2012-12-18 Thread Simon Riggs
On 18 December 2012 00:53, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On 17 December 2012 14:16, Heikki Linnakangas hlinnakan...@vmware.com wrote: I also wonder if pg_basebackup should include *all* timeline history files in the backup, not just the latest

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 si...@2ndquadrant.com wrote: On 18 December 2012 00:53, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On 17 December 2012 14:16, Heikki Linnakangas hlinnakan...@vmware.com wrote: I also wonder if pg_basebackup should

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

2012-12-18 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: On Tue, Dec 18, 2012 at 8:09 PM, Simon Riggs si...@2ndquadrant.com 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

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

2012-12-17 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com 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

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 t...@sss.pgh.pa.us wrote: Heikki Linnakangas hlinnakan...@vmware.com 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

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

2012-12-17 Thread Simon Riggs
On 17 December 2012 14:16, Heikki Linnakangas hlinnakan...@vmware.com 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

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

2012-12-17 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On 17 December 2012 14:16, Heikki Linnakangas hlinnakan...@vmware.com 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