Re: Speedup twophase transactions - Mailing list pgsql-hackers

From Stas Kelvich
Subject Re: Speedup twophase transactions
Date
Msg-id 50E7F508-1C04-4BCC-A6E7-F284C6CB7F26@postgrespro.ru
Whole thread Raw
In response to Re: Speedup twophase transactions  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Speedup twophase transactions  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Thanks a lot for your edits, now that patch is much more cleaner.

> Your comments say
>
>   "In case of crash replay will move data from xlog to files, if that hasn't happened before."
>
> but I don't see that in code. Can you show me where that happens?

xact.c calls RecreateTwoPhaseFile in xact_redo() function (xact.c:5596)

> On 09 Jan 2016, at 18:29, Simon Riggs <simon@2ndquadrant.com> wrote:
>
> Hmm, I was just preparing this for commit.
>
> Please have a look at my mild edits and extended comments.


One concern that come into my mind while reading updated
patch is about creating extra bool field in GlobalTransactionData structure. While this improves readability, it
also increases size of that structure and that size have impact on performance on systems with many cores
(say like 60-80). Probably one byte will not make measurable difference, but I think it is good idea to keep
GXact as small as possible. As far as I understand the same logic was behind split of
PGPROC to PGPROC+PGXACT in 9.2 (comment in proc.h:166)

Stas Kelvich
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: PATCH: Extending the HyperLogLog API a bit
Next
From: Michael Paquier
Date:
Subject: Re: [COMMITTERS] pgsql: Blind attempt at a Cygwin fix