Commit 1e2bfb58 authored by Bruce Momjian's avatar Bruce Momjian

Cleanup for procarray.c.

parent 404c0043
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.21 2007/01/16 13:28:56 alvherre Exp $ * $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.22 2007/03/23 03:16:39 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -590,6 +590,11 @@ GetSnapshotData(Snapshot snapshot, bool serializable) ...@@ -590,6 +590,11 @@ GetSnapshotData(Snapshot snapshot, bool serializable)
xmax = ReadNewTransactionId(); 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++) for (index = 0; index < arrayP->numProcs; index++)
{ {
PGPROC *proc = arrayP->procs[index]; PGPROC *proc = arrayP->procs[index];
...@@ -614,8 +619,7 @@ GetSnapshotData(Snapshot snapshot, bool serializable) ...@@ -614,8 +619,7 @@ GetSnapshotData(Snapshot snapshot, bool serializable)
if (TransactionIdPrecedes(xid, xmin)) if (TransactionIdPrecedes(xid, xmin))
xmin = xid; xmin = xid;
snapshot->xip[count] = xid; snapshot->xip[count++] = xid;
count++;
/* Update globalxmin to be the smallest valid xmin */ /* Update globalxmin to be the smallest valid xmin */
xid = proc->xmin; xid = proc->xmin;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment