From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Support synchronization of snapshots through an export/import pr |
Date: | 2011-10-22 22:24:00 |
Message-ID: | E1RHjyy-0004ir-I2@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-10-23 04:44:47 | pgsql: Don't trust deferred-unique indexes for join removal. |
Previous Message | Heikki Linnakangas | 2011-10-22 17:28:09 | pgsql: Fix overly-complicated usage of errcode_for_file_access(). |