diff options
| author | Tom Lane | 2011-10-22 22:22:45 +0000 |
|---|---|---|
| committer | Tom Lane | 2011-10-22 22:23:30 +0000 |
| commit | bb446b689b6681eb57a8a50605e119743190c4db (patch) | |
| tree | 2605250c0d2a465c4ff6ef7454df4c56902759cd /src/include/utils | |
| parent | b436c72f61adf5efab435c282bfb13a29508d475 (diff) | |
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
Diffstat (limited to 'src/include/utils')
| -rw-r--r-- | src/include/utils/snapmgr.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/utils/snapmgr.h b/src/include/utils/snapmgr.h index e665a28aff..1e5cb866b1 100644 --- a/src/include/utils/snapmgr.h +++ b/src/include/utils/snapmgr.h @@ -42,4 +42,9 @@ extern void AtSubCommit_Snapshot(int level); extern void AtSubAbort_Snapshot(int level); extern void AtEOXact_Snapshot(bool isCommit); +extern Datum pg_export_snapshot(PG_FUNCTION_ARGS); +extern void ImportSnapshot(const char *idstr); +extern bool XactHasExportedSnapshots(void); +extern void DeleteAllExportedSnapshotFiles(void); + #endif /* SNAPMGR_H */ |
