pgsql: Support synchronization of snapshots through an export/import pr - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Support synchronization of snapshots through an export/import pr
Date
Msg-id E1RHjyy-0004ir-I2@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Support synchronization of snapshots through an export/import procedure.

A transaction can export a snapshot with pg_export_snapshot(), and then
others can import it with SET TRANSACTION SNAPSHOT.  The data does not
leave the server so there are not security issues.  A snapshot can only
be imported while the exporting transaction is still running, and there
are some other restrictions.

I'm not totally convinced that we've covered all the bases for SSI (true
serializable) mode, but it works fine for lesser isolation modes.

Joachim Wieland, reviewed by Marko Tiikkaja, and rather heavily modified
by Tom Lane

Branch
------
master

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

Modified Files
--------------
doc/src/sgml/func.sgml                |  130 +++++++-
doc/src/sgml/ref/set_transaction.sgml |   79 ++++-
doc/src/sgml/storage.sgml             |    5 +
src/backend/access/transam/xact.c     |   10 +
src/backend/access/transam/xlog.c     |    7 +
src/backend/parser/gram.y             |   13 +-
src/backend/storage/ipc/procarray.c   |   97 +++++-
src/backend/storage/lmgr/predicate.c  |   76 ++++-
src/backend/utils/misc/guc.c          |   20 +-
src/backend/utils/time/snapmgr.c      |  605 ++++++++++++++++++++++++++++++++-
src/bin/initdb/initdb.c               |    1 +
src/include/catalog/catversion.h      |    2 +-
src/include/catalog/pg_proc.h         |    3 +
src/include/parser/kwlist.h           |    1 +
src/include/storage/predicate.h       |    2 +
src/include/storage/procarray.h       |    8 +-
src/include/utils/snapmgr.h           |    5 +
17 files changed, 1030 insertions(+), 34 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix overly-complicated usage of errcode_for_file_access().
Next
From: Tom Lane
Date:
Subject: pgsql: Don't trust deferred-unique indexes for join removal.