2323 *
2424 *
2525 * IDENTIFICATION
26- * $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.21 2007/01/16 13:28:56 alvherre Exp $
26+ * $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.22 2007/03/23 03:16:39 momjian Exp $
2727 *
2828 *-------------------------------------------------------------------------
2929 */
@@ -590,6 +590,11 @@ GetSnapshotData(Snapshot snapshot, bool serializable)
590590
591591xmax = ReadNewTransactionId ();
592592
593+ /*
594+ * Spin over procArray checking xid, xmin, and subxids. The goal is
595+ * to gather all active xids, find the lowest xmin, and try to record
596+ * subxids.
597+ */
593598for (index = 0 ;index < arrayP -> numProcs ;index ++ )
594599{
595600PGPROC * proc = arrayP -> procs [index ];
@@ -614,8 +619,7 @@ GetSnapshotData(Snapshot snapshot, bool serializable)
614619
615620if (TransactionIdPrecedes (xid ,xmin ))
616621xmin = xid ;
617- snapshot -> xip [count ]= xid ;
618- count ++ ;
622+ snapshot -> xip [count ++ ]= xid ;
619623
620624/* Update globalxmin to be the smallest valid xmin */
621625xid = proc -> xmin ;