#include "storage/indexfsm.h"
#include "storage/ipc.h"
#include "storage/lmgr.h"
-#include "storage/predicate.h"
#include "storage/smgr.h"
#include "tcop/tcopprot.h"
#include "utils/memutils.h"
if (!BufferIsValid(buf))
{
/*
- * We only get here if the index is completely empty.
- * Lock relation because nothing finer to lock exists.
+ * We only get here if the index is completely empty. Lock relation
+ * because nothing finer to lock exists.
*/
PredicateLockRelation(rel, scan->xs_snapshot);
return false;
NULL, /* END ID */
lock_twophase_recover, /* Lock */
NULL, /* pgstat */
- multixact_twophase_recover, /* MultiXact */
+ multixact_twophase_recover, /* MultiXact */
predicatelock_twophase_recover /* PredicateLock */
};
NULL, /* END ID */
lock_twophase_postabort, /* Lock */
pgstat_twophase_postabort, /* pgstat */
- multixact_twophase_postabort, /* MultiXact */
+ multixact_twophase_postabort, /* MultiXact */
NULL /* PredicateLock */
};
* MySerializableXact, so that subsequent calls to this function can exit
* quickly.
*
- * A transaction is flagged as RO_SAFE if all concurrent R/W
- * transactions commit without having conflicts out to an earlier
- * snapshot, thus ensuring that no conflicts are possible for this
- * transaction.
+ * A transaction is flagged as RO_SAFE if all concurrent R/W transactions
+ * commit without having conflicts out to an earlier snapshot, thus
+ * ensuring that no conflicts are possible for this transaction.
*/
if (SxactIsROSafe(MySerializableXact))
{
if (!PredicateLockingNeededForRelation(relation))
return false;
- return true; /* no excuse to skip predicate locking */
+ return true; /* no excuse to skip predicate locking */
}
/*
if (!PredicateLockingNeededForRelation(relation))
return false;
- return true; /* no excuse to skip predicate locking */
+ return true; /* no excuse to skip predicate locking */
}
/* conflict detection (may also trigger rollback) */
extern void CheckForSerializableConflictOut(const bool valid, const Relation relation, const HeapTuple tuple,
- const Buffer buffer, const Snapshot snapshot);
+ const Buffer buffer, const Snapshot snapshot);
extern void CheckForSerializableConflictIn(const Relation relation, const HeapTuple tuple, const Buffer buffer);
extern void CheckTableForSerializableConflictIn(const Relation relation);
int pid; /* pid of associated process */
} SERIALIZABLEXACT;
-#define SXACT_FLAG_COMMITTED 0x00000001 /* already committed */
-#define SXACT_FLAG_PREPARED 0x00000002 /* about to commit */
-#define SXACT_FLAG_DOOMED 0x00000004 /* will roll back */
+#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
/*
* These global variables are maintained when registering and cleaning up
* serializable transactions. They must be global across all backends,
- * but are not needed outside the predicate.c source file. Protected
- * by SerializableXactHashLock.
+ * but are not needed outside the predicate.c source file. Protected by
+ * SerializableXactHashLock.
*/
TransactionId SxactGlobalXmin; /* global xmin for active serializable
* transactions */