Re: [HACKERS] Speedup twophase transactions - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] Speedup twophase transactions
Date
Msg-id CAB7nPqQ45Hy_RZKV7cSJCacrCuqwjU83jtT0adRrhJKsvYzBOA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Speedup twophase transactions  (Nikhil Sontakke <nikhils@2ndquadrant.com>)
Responses Re: [HACKERS] Speedup twophase transactions  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Fri, Mar 17, 2017 at 5:00 PM, Nikhil Sontakke
<nikhils@2ndquadrant.com> wrote:
>> >
>> > Ok, we can do that and then yes, RecoverPreparedTransaction() can just
>> > have
>> > one loop going through the shmem entries. BUT, we cannot ignore
>> > "inredo"+"ondisk" entries. For such entries, we will have to read and
>> > recover from the corresponding 2PC files.
>>
>> Yes. About other things I found... In CheckPointTwoPhase(), I am
>> actually surprised that prepare_start_lsn and prepare_end_lsn are not
>> reset to InvalidXLogRecPtr when a shmem entry is flushed to disk after
>> ondisk is set to true, there is no need for them as the data does not
>> need to be fetched from WAL segments so we had better be consistent
>> (regression tests fail if I do that). And the two extra arguments in
>> MarkAsPreparing() are really unnecessary, they get set all the time to
>> InvalidXLogRecPtr.
>
>
> Micheal, it looks like you are working on a final version of this patch? I
> will wait to review it from my end, then.

I have to admit that I am beginning to get drawn into it...
-- 
Michael



pgsql-hackers by date:

Previous
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: [HACKERS] Potential data loss of 2PC files
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: [HACKERS] PATCH: Make pg_stop_backup() archive wait optional