pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndQuadrant.com>
To: pgsql-committers@postgresql.org
Subject: pgsql: Speedup 2PC by skipping two phase state files in normal path
Date: Thu, 21 Jan 2016 02:40:58 +0000
Message-ID: <E1aM5BC-0001Fr-MB@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Speedup 2PC by skipping two phase state files in normal path

2PC state info is written only to WAL at PREPARE, then read back from WAL at
COMMIT PREPARED/ABORT PREPARED. Prepared transactions that live past one bufmgr
checkpoint cycle will be written to disk in the same form as previously. Crash
recovery path is not altered. Measured performance gains of 50-100% for short
2PC transactions by completely avoiding writing files and fsyncing. Other
optimizations still available, further patches in related areas expected.

Stas Kelvich and heavily edited by Simon Riggs

Based upon earlier ideas and patches by Michael Paquier and Heikki Linnakangas,
a concrete example of how Postgres-XC has fed back ideas into PostgreSQL.

Reviewed by Michael Paquier, Jeff Janes and Andres Freund
Performance testing by Jesper Pedersen

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/978b2f65aa1262eb4ecbf8b3785cb1b9cf4db78e

Modified Files
--------------
src/backend/access/transam/twophase.c |  377 ++++++++++++++-------------------
src/backend/access/transam/xlog.c     |    3 +-
src/include/access/xlog.h             |    1 +
3 files changed, 160 insertions(+), 221 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1aM5BC-0001Fr-MB@gemulon.postgresql.org>
Permalink:  ../E1aM5BC-0001Fr-MB@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1aM5BC-0001Fr-MB@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: simon@2ndQuadrant.com
  Subject: Re: pgsql: Speedup 2PC by skipping two phase state files in normal path
  In-Reply-To: <E1aM5BC-0001Fr-MB@gemulon.postgresql.org>
  References: <E1aM5BC-0001Fr-MB@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox