Re: [HACKERS] Failed recovery with new faster 2PC code

2017-04-18 Thread Michael Paquier
On Wed, Apr 19, 2017 at 11:09 AM, Jeff Janes wrote: > Would this bug have been seen in a replica server in the absence of crashes, > or was it only vulnerable during crash recovery rather than streaming > replication? This issue could have been seen on a streaming standby

Re: [HACKERS] Failed recovery with new faster 2PC code

2017-04-18 Thread Jeff Janes
On Tue, Apr 18, 2017 at 1:17 AM, Nikhil Sontakke wrote: > Hi, > > There was a bug in the redo 2PC remove code path. Because of which, > autovac would think that the 2PC is gone and cause removal of the > corresponding clog entry earlier than needed. > > Please find

Re: [HACKERS] Failed recovery with new faster 2PC code

2017-04-18 Thread Jeff Janes
On Tue, Apr 18, 2017 at 5:38 AM, Simon Riggs wrote: > On 18 April 2017 at 13:12, Michael Paquier > wrote: > > On Tue, Apr 18, 2017 at 7:54 PM, Simon Riggs > wrote: > >> Yeh, this is better. Pushed. > > > > I have been

Re: [HACKERS] Failed recovery with new faster 2PC code

2017-04-18 Thread Simon Riggs
On 18 April 2017 at 13:12, Michael Paquier wrote: > On Tue, Apr 18, 2017 at 7:54 PM, Simon Riggs wrote: >> Yeh, this is better. Pushed. > > I have been outraced on this one, the error is obvious once you see it ;) Didn't realise you were working

Re: [HACKERS] Failed recovery with new faster 2PC code

2017-04-18 Thread Michael Paquier
On Tue, Apr 18, 2017 at 7:54 PM, Simon Riggs wrote: > Yeh, this is better. Pushed. I have been outraced on this one, the error is obvious once you see it ;) Thanks for the investigation and the fix! I have spent a couple of hours reviewing the interactions between the

Re: [HACKERS] Failed recovery with new faster 2PC code

2017-04-18 Thread Simon Riggs
On 18 April 2017 at 09:57, Nikhil Sontakke wrote: > Please find attached a second version of my bug fix which is stylistically > better and clearer than the first one. Yeh, this is better. Pushed. The bug was that the loop set gxact to be the last entry in the array,

Re: [HACKERS] Failed recovery with new faster 2PC code

2017-04-18 Thread Nikhil Sontakke
Please find attached a second version of my bug fix which is stylistically better and clearer than the first one. Regards, Nikhils On 18 April 2017 at 13:47, Nikhil Sontakke wrote: > Hi, > > There was a bug in the redo 2PC remove code path. Because of which, > autovac

Re: [HACKERS] Failed recovery with new faster 2PC code

2017-04-18 Thread Nikhil Sontakke
Hi, There was a bug in the redo 2PC remove code path. Because of which, autovac would think that the 2PC is gone and cause removal of the corresponding clog entry earlier than needed. Please find attached, the bug fix: 2pc_redo_remove_bug.patch. I have been testing this on top of Michael's

Re: [HACKERS] Failed recovery with new faster 2PC code

2017-04-18 Thread Nikhil Sontakke
On 17 April 2017 at 15:02, Nikhil Sontakke wrote: > > >> >> commit 728bd991c3c4389fb39c45dcb0fe57e4a1dccd71 >> >> Author: Simon Riggs >> >> Date: Tue Apr 4 15:56:56 2017 -0400 >> >> >> >>Speedup 2PC recovery by skipping two phase state files

Re: [HACKERS] Failed recovery with new faster 2PC code

2017-04-17 Thread Nikhil Sontakke
> >> commit 728bd991c3c4389fb39c45dcb0fe57e4a1dccd71 > >> Author: Simon Riggs > >> Date: Tue Apr 4 15:56:56 2017 -0400 > >> > >>Speedup 2PC recovery by skipping two phase state files in normal path > > > > Thanks Jeff for your tests. > > > > So that's now two crash

Re: [HACKERS] Failed recovery with new faster 2PC code

2017-04-17 Thread Stas Kelvich
> On 17 Apr 2017, at 12:14, Simon Riggs wrote: > > On 15 April 2017 at 23:37, Jeff Janes wrote: >> After this commit, I get crash recovery failures when using prepared >> transactions. >> >> commit 728bd991c3c4389fb39c45dcb0fe57e4a1dccd71 >>

Re: [HACKERS] Failed recovery with new faster 2PC code

2017-04-17 Thread Simon Riggs
On 15 April 2017 at 23:37, Jeff Janes wrote: > After this commit, I get crash recovery failures when using prepared > transactions. > > commit 728bd991c3c4389fb39c45dcb0fe57e4a1dccd71 > Author: Simon Riggs > Date: Tue Apr 4 15:56:56 2017 -0400 > >

[HACKERS] Failed recovery with new faster 2PC code

2017-04-15 Thread Jeff Janes
After this commit, I get crash recovery failures when using prepared transactions. commit 728bd991c3c4389fb39c45dcb0fe57e4a1dccd71 Author: Simon Riggs Date: Tue Apr 4 15:56:56 2017 -0400 Speedup 2PC recovery by skipping two phase state files in normal path After