Re: Speedup twophase transactions

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Speedup twophase transactions
Date: 2016-01-11 19:20:59
Message-ID: CANP8+j+x+DWmqTqLmjgFJo_SfLcLX77eCkasDt5-SFz3fx0AqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11 January 2016 at 18:51, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
wrote:

> On 01/10/2016 04:15 AM, Simon Riggs wrote:
>
>> 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)
>>>
>>
>>
>> I think padding will negate the effects of the additional bool.
>>
>> If we want to reduce the size of the array GIDSIZE is currently 200, but
>> XA
>> says maximum 128 bytes.
>>
>> Anybody know why that is set to 200?
>>
>>
> Even though GlobalTransactionId and BranchQualifer have a maximum of 64
> each, external clients may choose to encode the information, and thereby
> need more space,
>
>
> https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/xa/RecoveredXid.java#L66-L70
>
> http://docs.oracle.com/javaee/7/api/javax/transaction/xa/Xid.html
>
> which in this case adds up to a maximum of 189 characters.
>

OK, thanks for those references.

--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2016-01-11 19:22:38 Re: PATCH: Extending the HyperLogLog API a bit
Previous Message Andres Freund 2016-01-11 19:18:29 Re: Speedup twophase transactions