Re: Speedup twophase transactions
От | Kevin Grittner |
---|---|
Тема | Re: Speedup twophase transactions |
Дата | |
Msg-id | CACjxUsNG5he_9auQBsAROVPGHt5iOsgpX4Y3P2fPB_OSWGo0jQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Speedup twophase transactions (Stas Kelvich <s.kelvich@postgrespro.ru>) |
Ответы |
Re: Speedup twophase transactions
|
Список | pgsql-hackers |
On Wed, Dec 9, 2015 at 12:44 PM, Stas Kelvich <s.kelvich@postgrespro.ru> wrote: > Now 2PC in postgres does following: > * on prepare 2pc data (subxacts, commitrels, abortrels, invalmsgs) saved to xlog and to file, but file not is not fsynced > * on commit backend reads data from file > * if checkpoint occurs before commit, then files are fsynced during checkpoint > * if case of crash replay will move data from xlog to files > > 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) That sounds like a very good plan to me. > 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 I assume that last one should have been *Patched master with 2PC"? Please add this to the January CommitFest. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: