Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef PREDICATE_H
00015 #define PREDICATE_H
00016
00017 #include "utils/relcache.h"
00018 #include "utils/snapshot.h"
00019
00020
00021
00022
00023
00024 extern int max_predicate_locks_per_xact;
00025
00026
00027
00028 #define NUM_OLDSERXID_BUFFERS 16
00029
00030
00031
00032
00033
00034
00035
00036 extern void InitPredicateLocks(void);
00037 extern Size PredicateLockShmemSize(void);
00038
00039 extern void CheckPointPredicate(void);
00040
00041
00042 extern bool PageIsPredicateLocked(Relation relation, BlockNumber blkno);
00043
00044
00045 extern Snapshot GetSerializableTransactionSnapshot(Snapshot snapshot);
00046 extern void SetSerializableTransactionSnapshot(Snapshot snapshot,
00047 TransactionId sourcexid);
00048 extern void RegisterPredicateLockingXid(TransactionId xid);
00049 extern void PredicateLockRelation(Relation relation, Snapshot snapshot);
00050 extern void PredicateLockPage(Relation relation, BlockNumber blkno, Snapshot snapshot);
00051 extern void PredicateLockTuple(Relation relation, HeapTuple tuple, Snapshot snapshot);
00052 extern void PredicateLockPageSplit(Relation relation, BlockNumber oldblkno, BlockNumber newblkno);
00053 extern void PredicateLockPageCombine(Relation relation, BlockNumber oldblkno, BlockNumber newblkno);
00054 extern void TransferPredicateLocksToHeapRelation(Relation relation);
00055 extern void ReleasePredicateLocks(bool isCommit);
00056
00057
00058 extern void CheckForSerializableConflictOut(bool valid, Relation relation, HeapTuple tuple,
00059 Buffer buffer, Snapshot snapshot);
00060 extern void CheckForSerializableConflictIn(Relation relation, HeapTuple tuple, Buffer buffer);
00061 extern void CheckTableForSerializableConflictIn(Relation relation);
00062
00063
00064 extern void PreCommit_CheckForSerializationFailure(void);
00065
00066
00067 extern void AtPrepare_PredicateLocks(void);
00068 extern void PostPrepare_PredicateLocks(TransactionId xid);
00069 extern void PredicateLockTwoPhaseFinish(TransactionId xid, bool isCommit);
00070 extern void predicatelock_twophase_recover(TransactionId xid, uint16 info,
00071 void *recdata, uint32 len);
00072
00073 #endif