pgsql: Speedup 2PC by skipping two phase state files in normal path - Mailing list pgsql-committers

From Simon Riggs
Subject pgsql: Speedup 2PC by skipping two phase state files in normal path
Date
Msg-id E1aM5BC-0001Fr-MB@gemulon.postgresql.org
Whole thread Raw
List pgsql-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(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: psql: Add tab completion for COPY with query
Next
From: Simon Riggs
Date:
Subject: pgsql: Refactor headers to split out standby defs