summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBernd Helmle2011-06-15 15:13:25 +0000
committerBernd Helmle2011-06-15 15:13:25 +0000
commit682cd6c79b296baa97877c4d05241f9c0a694fea (patch)
treeeedb94cc08ca455237365ad2fd0126053a75c1f6 /src/include
parent74375c8a693ff03da416b0df95b02831f4812c01 (diff)
parent264a6b127a918800d9f8bac80b5f4a8a8799d0f1 (diff)
Merge branch 'master' of ../bernd_pg into notnull_constraintnotnull_constraint
Diffstat (limited to 'src/include')
-rw-r--r--src/include/storage/predicate.h9
-rw-r--r--src/include/storage/predicate_internals.h11
2 files changed, 10 insertions, 10 deletions
diff --git a/src/include/storage/predicate.h b/src/include/storage/predicate.h
index 760c76cff0..aae5326fd8 100644
--- a/src/include/storage/predicate.h
+++ b/src/include/storage/predicate.h
@@ -44,16 +44,17 @@ extern bool PageIsPredicateLocked(const Relation relation, const BlockNumber blk
/* predicate lock maintenance */
extern Snapshot RegisterSerializableTransaction(Snapshot snapshot);
extern void RegisterPredicateLockingXid(const TransactionId xid);
-extern void PredicateLockRelation(const Relation relation);
-extern void PredicateLockPage(const Relation relation, const BlockNumber blkno);
-extern void PredicateLockTuple(const Relation relation, const HeapTuple tuple);
+extern void PredicateLockRelation(const Relation relation, const Snapshot snapshot);
+extern void PredicateLockPage(const Relation relation, const BlockNumber blkno, const Snapshot snapshot);
+extern void PredicateLockTuple(const Relation relation, const HeapTuple tuple, const Snapshot snapshot);
extern void PredicateLockPageSplit(const Relation relation, const BlockNumber oldblkno, const BlockNumber newblkno);
extern void PredicateLockPageCombine(const Relation relation, const BlockNumber oldblkno, const BlockNumber newblkno);
extern void TransferPredicateLocksToHeapRelation(const Relation relation);
extern void ReleasePredicateLocks(const bool isCommit);
/* conflict detection (may also trigger rollback) */
-extern void CheckForSerializableConflictOut(const bool valid, const Relation relation, const HeapTuple tuple, const Buffer buffer);
+extern void CheckForSerializableConflictOut(const bool valid, const Relation relation, const HeapTuple tuple,
+ const Buffer buffer, const Snapshot snapshot);
extern void CheckForSerializableConflictIn(const Relation relation, const HeapTuple tuple, const Buffer buffer);
extern void CheckTableForSerializableConflictIn(const Relation relation);
diff --git a/src/include/storage/predicate_internals.h b/src/include/storage/predicate_internals.h
index da6e641f4e..b305c6a4c7 100644
--- a/src/include/storage/predicate_internals.h
+++ b/src/include/storage/predicate_internals.h
@@ -90,22 +90,21 @@ typedef struct SERIALIZABLEXACT
int pid; /* pid of associated process */
} SERIALIZABLEXACT;
-#define SXACT_FLAG_ROLLED_BACK 0x00000001
-#define SXACT_FLAG_COMMITTED 0x00000002
+#define SXACT_FLAG_COMMITTED 0x00000001 /* already committed */
+#define SXACT_FLAG_PREPARED 0x00000002 /* about to commit */
+#define SXACT_FLAG_DOOMED 0x00000004 /* will roll back */
/*
* The following flag actually means that the flagged transaction has a
* conflict out *to a transaction which committed ahead of it*. It's hard
* to get that into a name of a reasonable length.
*/
-#define SXACT_FLAG_CONFLICT_OUT 0x00000004
-#define SXACT_FLAG_READ_ONLY 0x00000008
-#define SXACT_FLAG_MARKED_FOR_DEATH 0x00000010
+#define SXACT_FLAG_CONFLICT_OUT 0x00000008
+#define SXACT_FLAG_READ_ONLY 0x00000010
#define SXACT_FLAG_DEFERRABLE_WAITING 0x00000020
#define SXACT_FLAG_RO_SAFE 0x00000040
#define SXACT_FLAG_RO_UNSAFE 0x00000080
#define SXACT_FLAG_SUMMARY_CONFLICT_IN 0x00000100
#define SXACT_FLAG_SUMMARY_CONFLICT_OUT 0x00000200
-#define SXACT_FLAG_PREPARED 0x00000400
/*
* The following types are used to provide an ad hoc list for holding