pgsql: Efficient transaction-controlled synchronous replication.

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Efficient transaction-controlled synchronous replication.
Date: 2011-03-06 22:51:56
Message-ID: E1PwMns-00047O-UU@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-committers pgsql-hackers

Efficient transaction-controlled synchronous replication.
If a standby is broadcasting reply messages and we have named
one or more standbys in synchronous_standby_names then allow
users who set synchronous_replication to wait for commit, which
then provides strict data integrity guarantees. Design avoids
sending and receiving transaction state information so minimises
bookkeeping overheads. We synchronize with the highest priority
standby that is connected and ready to synchronize. Other standbys
can be defined to takeover in case of standby failure.

This version has very strict behaviour; more relaxed options
may be added at a later date.

Simon Riggs and Fujii Masao, with reviews by Yeb Havinga, Jaime
Casanova, Heikki Linnakangas and Robert Haas, plus the assistance
of many other design reviewers.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a8a8a3e0965201df88bdfdff08f50e5c06c552b7

Modified Files
--------------
doc/src/sgml/config.sgml | 86 +++++++++++
doc/src/sgml/high-availability.sgml | 203 +++++++++++++++++++++++++
doc/src/sgml/monitoring.sgml | 7 +-
src/backend/access/transam/twophase.c | 25 +++
src/backend/access/transam/xact.c | 11 ++-
src/backend/catalog/system_views.sql | 4 +-
src/backend/postmaster/autovacuum.c | 7 +
src/backend/postmaster/postmaster.c | 3 +
src/backend/replication/Makefile | 2 +-
src/backend/replication/walreceiver.c | 9 +-
src/backend/replication/walsender.c | 65 +++++++-
src/backend/storage/ipc/shmqueue.c | 21 +++-
src/backend/storage/lmgr/proc.c | 12 ++
src/backend/utils/misc/guc.c | 19 +++
src/backend/utils/misc/postgresql.conf.sample | 11 ++-
src/include/catalog/pg_proc.h | 2 +-
src/include/replication/walsender.h | 22 +++
src/include/storage/lwlock.h | 1 +
src/include/storage/proc.h | 14 ++
src/include/storage/shmem.h | 3 +
src/test/regress/expected/rules.out | 2 +-
21 files changed, 507 insertions(+), 22 deletions(-)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2011-03-06 23:09:53 Re: pgsql: Efficient transaction-controlled synchronous replication.
Previous Message Simon Riggs 2011-03-06 22:36:15 Re: How should the primary behave when the sync standby goes away? Re: Sync Rep v17

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2011-03-06 23:09:53 Re: pgsql: Efficient transaction-controlled synchronous replication.
Previous Message Tom Lane 2011-03-06 17:11:10 pgsql: Fix incorrect access to pg_index.indcollation.