From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Speedup twophase transactions |
Date: | 2015-12-10 19:47:30 |
Message-ID: | CANP8+jLV3SOA7L5+diLj_0rFJPTL=tFgJvtg7m6JibYnX8qe-w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 9 December 2015 at 18:44, Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru> wrote:
> In this patch I’ve changed this procedures to following:
> * on prepare backend writes data only to xlog and store pointer to the
> start of the xlog record
> * if commit occurs before checkpoint then backend reads data from xlog by
> this pointer
> * on checkpoint 2pc data copied to files and fsynced
> * if commit happens after checkpoint then backend reads files
> * in case of crash replay will move data from xlog to files (as it was
> before patch)
>
This looks sound to me.
I think we could do better still, but this looks like the easiest 80% and
actually removes code.
The lack of substantial comments on the patch is a problem though - the
details above should go in the patch. I'll have a go at reworking this for
you, this time.
--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Caleb Welton | 2015-12-10 19:47:51 | Re: Bootstrap DATA is a pita |
Previous Message | Tom Lane | 2015-12-10 19:47:25 | Re: Inaccurate results from numeric ln(), log(), exp() and pow() |