Re: [HACKERS] Failed recovery with new faster 2PC code - Mailing list pgsql-hackers

From Nikhil Sontakke
Subject Re: [HACKERS] Failed recovery with new faster 2PC code
Date
Msg-id CAMGcDxeka9UssT4GuE-4eHmCoYuJ92OcqebcnYzPzTNOB3YS6g@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Failed recovery with new faster 2PC code  (Nikhil Sontakke <nikhils@2ndquadrant.com>)
Responses Re: [HACKERS] Failed recovery with new faster 2PC code  (Nikhil Sontakke <nikhils@2ndquadrant.com>)
List pgsql-hackers


On 17 April 2017 at 15:02, Nikhil Sontakke <nikhils@2ndquadrant.com> wrote:
 
>> commit 728bd991c3c4389fb39c45dcb0fe57e4a1dccd71
>> Author: Simon Riggs <simon@2ndQuadrant.com>
>> 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 bugs in as many days and lack of clarity about
> how to fix it.
>

The issue seems to be that a prepared transaction is yet to be committed. But autovacuum comes in and causes the clog to be truncated beyond this prepared transaction ID in one of the runs.

We only add the corresponding pgproc entry for a surviving 2PC transaction on completion of recovery. So could be a race condition here. Digging in further. 

Regards,
Nikhils
--
 Nikhil Sontakke                   http://www.2ndQuadrant.com/
 PostgreSQL/Postgres-XL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Kang Yuzhe
Date:
Subject: Re: [HACKERS] On How To Shorten the Steep Learning Curve Towards PG Hacking...
Next
From: Kang Yuzhe
Date:
Subject: Re: [HACKERS] On How To Shorten the Steep Learning Curve Towards PG Hacking...