Re: Speedup twophase transactions

From: Michael Paquier <michael(dot)paquier(at)gmail(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-09 23:16:19
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers

On Thu, Dec 10, 2015 at 3:44 AM, Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru> wrote:
> Most of that ideas was already mentioned in 2009 thread by Michael Paquier where he suggested to store 2pc data in shared memory.
> At that time patch was declined because no significant speedup were observed. Now I see performance improvements by my patch at about 60%. Probably old benchmark overall tps was lower and it was harder to hit filesystem fopen/fclose limits.

Glad to see this patch is given a second life 6 years later.

> Now results of benchmark are following (dual 6-core xeon server):
> Current master without 2PC: ~42 ktps
> Current master with 2PC: ~22 ktps
> Current master with 2PC: ~36 ktps

That's nice.

+ XLogRecPtr prepare_xlogptr; /* XLOG offset of prepare record start
+ * or NULL if twophase data moved to file
+ * after checkpoint.
+ */
This has better be InvalidXLogRecPtr if unused.

+ if (gxact->prepare_lsn)
+ {
+ XlogReadTwoPhaseData(gxact->prepare_xlogptr, &buf, NULL);
+ }
Perhaps you mean prepare_xlogptr here?

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Eric Ridge 2015-12-09 23:42:08 Re: Given a view relation OID, how to construct a Query?
Previous Message Merlin Moncure 2015-12-09 23:13:38 Re: [sqlsmith] Failed to generate plan on lateral subqueries