diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-23 23:20:52 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-23 23:20:52 +0000 |
commit | 61b22d3aab48fc462bf7283964fde9b3071a72fd (patch) | |
tree | 9e6816098e675790cf22511cad4025cc91f5f34d /src/backend/storage/ipc/sinval.c | |
parent | 3bbd6af37cef7a46f6d3ecb8d95b58614bd76f52 (diff) |
btree page recycling can be done as soon as page's next-xact label is
older than current Xmin; we don't have to wait till it's older than
GlobalXmin.
Diffstat (limited to 'src/backend/storage/ipc/sinval.c')
-rw-r--r-- | src/backend/storage/ipc/sinval.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/backend/storage/ipc/sinval.c b/src/backend/storage/ipc/sinval.c index 239c3bc8d30..fedb438e976 100644 --- a/src/backend/storage/ipc/sinval.c +++ b/src/backend/storage/ipc/sinval.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.53 2002/11/21 06:36:08 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.54 2003/02/23 23:20:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -298,9 +298,10 @@ GetOldestXmin(bool allDbs) * This ensures that the set of transactions seen as "running" by the * current xact will not change after it takes the snapshot. * - * Also, we compute the current global xmin (oldest xmin across all running + * We also compute the current global xmin (oldest xmin across all running * transactions) and save it in RecentGlobalXmin. This is the same - * computation done by GetOldestXmin(TRUE). + * computation done by GetOldestXmin(TRUE). The xmin value is also stored + * into RecentXmin. *---------- */ Snapshot @@ -419,7 +420,9 @@ GetSnapshotData(bool serializable) if (TransactionIdPrecedes(xmin, globalxmin)) globalxmin = xmin; + /* Update globals for use by VACUUM */ RecentGlobalXmin = globalxmin; + RecentXmin = xmin; snapshot->xmin = xmin; snapshot->xmax = xmax; |