mirror of
https://github.com/postgres/postgres.git
synced 2025-11-24 00:23:06 +03:00
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
This commit is contained in:
@@ -43,6 +43,8 @@ extern bool PageIsPredicateLocked(Relation relation, BlockNumber blkno);
|
||||
|
||||
/* predicate lock maintenance */
|
||||
extern Snapshot GetSerializableTransactionSnapshot(Snapshot snapshot);
|
||||
extern void SetSerializableTransactionSnapshot(Snapshot snapshot,
|
||||
TransactionId sourcexid);
|
||||
extern void RegisterPredicateLockingXid(TransactionId xid);
|
||||
extern void PredicateLockRelation(Relation relation, Snapshot snapshot);
|
||||
extern void PredicateLockPage(Relation relation, BlockNumber blkno, Snapshot snapshot);
|
||||
|
||||
Reference in New Issue
Block a user