]> granicus.if.org Git - postgresql/commit
Support synchronization of snapshots through an export/import procedure.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 22 Oct 2011 22:22:45 +0000 (18:22 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 22 Oct 2011 22:23:30 +0000 (18:23 -0400)
commitbb446b689b6681eb57a8a50605e119743190c4db
tree2605250c0d2a465c4ff6ef7454df4c56902759cd
parentb436c72f61adf5efab435c282bfb13a29508d475
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
17 files changed:
doc/src/sgml/func.sgml
doc/src/sgml/ref/set_transaction.sgml
doc/src/sgml/storage.sgml
src/backend/access/transam/xact.c
src/backend/access/transam/xlog.c
src/backend/parser/gram.y
src/backend/storage/ipc/procarray.c
src/backend/storage/lmgr/predicate.c
src/backend/utils/misc/guc.c
src/backend/utils/time/snapmgr.c
src/bin/initdb/initdb.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/parser/kwlist.h
src/include/storage/predicate.h
src/include/storage/procarray.h
src/include/utils/snapmgr.h