Re: [HACKERS] [BUGS] BUG #14230: Wrong timeline returned by pg_stop_backup on a standby

2016-07-11 Thread Magnus Hagander
On Mon, Jul 11, 2016 at 3:05 PM, Michael Paquier wrote: > On Mon, Jul 11, 2016 at 7:01 PM, Magnus Hagander > wrote: > > But isn't this also a pre-existing bug in 9.5? Or did we change something > > else that suddenly made it visible? > > What has

Re: [HACKERS] [BUGS] BUG #14230: Wrong timeline returned by pg_stop_backup on a standby

2016-07-11 Thread Michael Paquier
On Mon, Jul 11, 2016 at 7:01 PM, Magnus Hagander wrote: > But isn't this also a pre-existing bug in 9.5? Or did we change something > else that suddenly made it visible? What has been patched here is a defect caused by pg_start_backup(), and not pg_basebackup. In the case of

Re: [HACKERS] [BUGS] BUG #14230: Wrong timeline returned by pg_stop_backup on a standby

2016-07-11 Thread Amit Kapila
On Mon, Jul 11, 2016 at 3:31 PM, Magnus Hagander wrote: > > > On Thu, Jul 7, 2016 at 8:38 AM, Michael Paquier > wrote: >> >> On Thu, Jul 7, 2016 at 12:57 AM, Marco Nenciarini >> wrote: >> > After further analysis,

Re: [HACKERS] [BUGS] BUG #14230: Wrong timeline returned by pg_stop_backup on a standby

2016-07-11 Thread Magnus Hagander
On Thu, Jul 7, 2016 at 8:38 AM, Michael Paquier wrote: > On Thu, Jul 7, 2016 at 12:57 AM, Marco Nenciarini > wrote: > > After further analysis, the issue is that we retrieve the starttli from > > the ControlFile structure, but it was

Re: [HACKERS] [BUGS] BUG #14230: Wrong timeline returned by pg_stop_backup on a standby

2016-07-09 Thread Magnus Hagander
On Jul 9, 2016 4:52 AM, "Noah Misch" wrote: > > On Thu, Jul 07, 2016 at 03:38:26PM +0900, Michael Paquier wrote: > > On Thu, Jul 7, 2016 at 12:57 AM, Marco Nenciarini > > wrote: > > > After further analysis, the issue is that we retrieve the

Re: [HACKERS] [BUGS] BUG #14230: Wrong timeline returned by pg_stop_backup on a standby

2016-07-09 Thread Amit Kapila
On Thu, Jul 7, 2016 at 12:08 PM, Michael Paquier wrote: > On Thu, Jul 7, 2016 at 12:57 AM, Marco Nenciarini > wrote: >> After further analysis, the issue is that we retrieve the starttli from >> the ControlFile structure, but it was

Re: [HACKERS] [BUGS] BUG #14230: Wrong timeline returned by pg_stop_backup on a standby

2016-07-08 Thread Michael Paquier
On Fri, Jul 8, 2016 at 6:40 PM, Marco Nenciarini wrote: > The resulting backup is working perfectly, because Postgres has no use > for pg_stop_backup LSN, but this can confuse any tool that uses the stop > LSN to figure out which WAL files are needed by the backup

Re: [HACKERS] [BUGS] BUG #14230: Wrong timeline returned by pg_stop_backup on a standby

2016-07-07 Thread Michael Paquier
On Thu, Jul 7, 2016 at 12:57 AM, Marco Nenciarini wrote: > After further analysis, the issue is that we retrieve the starttli from > the ControlFile structure, but it was using ThisTimeLineID when writing > the backup label. > > I've attached a very simple patch