Re: Speedup twophase transactions
Simon Riggs <simon@2ndquadrant.com>
From: Simon Riggs <simon@2ndQuadrant.com>
To: Jesper Pedersen <jesper.pedersen@redhat.com>
Cc: Simon Riggs <simon@2ndquadrant.com>,
Stas Kelvich <s.kelvich@postgrespro.ru>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-01-11T19:20:59Z
Lists: pgsql-hackers
On 11 January 2016 at 18:51, Jesper Pedersen <jesper.pedersen@redhat.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
Commits
-
Speedup 2PC recovery by skipping two phase state files in normal path
- 728bd991c3c4 10.0 landed
-
Add tests for two-phase commit
- 30820982b295 10.0 landed
-
Improve grammar of message about two-phase state files.
- 38c363adf497 10.0 landed
-
Speedup 2PC by skipping two phase state files in normal path
- 978b2f65aa12 9.6.0 cited