Cleanup for procarray.c.
authorBruce Momjian <bruce@momjian.us>
Fri, 23 Mar 2007 03:16:39 +0000 (03:16 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 23 Mar 2007 03:16:39 +0000 (03:16 +0000)
src/backend/storage/ipc/procarray.c

index 2d1493bb095f0e51f536ed86d62ab80beec1dfa2..cddbcc2485b7294251756876701d095cd9dec0a4 100644 (file)
@@ -590,6 +590,11 @@ GetSnapshotData(Snapshot snapshot, bool serializable)
 
        xmax = ReadNewTransactionId();
 
+       /*
+        * Spin over procArray checking xid, xmin, and subxids.  The goal is
+        * to gather all active xids, find the lowest xmin, and try to record
+        * subxids.
+        */
        for (index = 0; index < arrayP->numProcs; index++)
        {
                PGPROC     *proc = arrayP->procs[index];
@@ -614,8 +619,7 @@ GetSnapshotData(Snapshot snapshot, bool serializable)
 
                if (TransactionIdPrecedes(xid, xmin))
                        xmin = xid;
-               snapshot->xip[count] = xid;
-               count++;
+               snapshot->xip[count++] = xid;
 
                /* Update globalxmin to be the smallest valid xmin */
                xid = proc->xmin;