pgindent run of recent SSI changes. Also, remove an unnecessary #include.
authorHeikki Linnakangas <[email protected]>
Thu, 16 Jun 2011 13:16:34 +0000 (16:16 +0300)
committerHeikki Linnakangas <[email protected]>
Thu, 16 Jun 2011 13:17:22 +0000 (16:17 +0300)
Kevin Grittner

src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtsearch.c
src/backend/access/transam/twophase_rmgr.c
src/backend/storage/lmgr/predicate.c
src/include/storage/predicate.h
src/include/storage/predicate_internals.h

index 6a7ddd7db4de414f011f7b855fd3f47a6bf97b45..ac86eb494f691c07f175e4f071e013a957df4457 100644 (file)
@@ -29,7 +29,6 @@
 #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"
index 0771d194636b706eda0229cb660139b171fb0dcc..5c00fac533b032ec61718a3db146b9d1898fd20e 100644 (file)
@@ -849,8 +849,8 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
    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;
index bbfec0da69eb5badc841b4339a72f9c0b5aa7b41..eeb445da9d75a6bd41d1b05a1554c6e58bccd8ea 100644 (file)
@@ -26,7 +26,7 @@ const TwoPhaseCallback twophase_recover_callbacks[TWOPHASE_RM_MAX_ID + 1] =
    NULL,                       /* END ID */
    lock_twophase_recover,      /* Lock */
    NULL,                       /* pgstat */
-   multixact_twophase_recover, /* MultiXact */
+   multixact_twophase_recover, /* MultiXact */
    predicatelock_twophase_recover      /* PredicateLock */
 };
 
@@ -44,7 +44,7 @@ const TwoPhaseCallback twophase_postabort_callbacks[TWOPHASE_RM_MAX_ID + 1] =
    NULL,                       /* END ID */
    lock_twophase_postabort,    /* Lock */
    pgstat_twophase_postabort,  /* pgstat */
-   multixact_twophase_postabort,   /* MultiXact */
+   multixact_twophase_postabort,       /* MultiXact */
    NULL                        /* PredicateLock */
 };
 
index a12f52ecc99c85f3baa76935ef8561f11f3e7d93..3678878f03ede4a06dffcd72952d4e489584888e 100644 (file)
@@ -483,10 +483,9 @@ SerializationNeededForRead(Relation relation, Snapshot snapshot)
     * 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))
    {
@@ -498,7 +497,7 @@ SerializationNeededForRead(Relation relation, Snapshot snapshot)
    if (!PredicateLockingNeededForRelation(relation))
        return false;
 
-   return true;    /* no excuse to skip predicate locking */
+   return true;                /* no excuse to skip predicate locking */
 }
 
 /*
@@ -516,7 +515,7 @@ SerializationNeededForWrite(Relation relation)
    if (!PredicateLockingNeededForRelation(relation))
        return false;
 
-   return true;    /* no excuse to skip predicate locking */
+   return true;                /* no excuse to skip predicate locking */
 }
 
 
index aae5326fd89d3b6fbbf1e69ca3903748b0b1608c..7b5846982e1b05af57ec83a5e2016a9f50dc4d72 100644 (file)
@@ -54,7 +54,7 @@ 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, 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);
 
index b305c6a4c797c9b61e355510f10256a5320c9492..495983f345805134d185d022ec84c69df78451ad 100644 (file)
@@ -90,9 +90,9 @@ typedef struct SERIALIZABLEXACT
    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
@@ -132,8 +132,8 @@ typedef struct PredXactListData
    /*
     * 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 */