summaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc/sinval.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-08-22 02:41:58 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-08-22 02:41:58 +0000
commitf009c316ba49857249611bc0d578c518c449879e (patch)
tree4fbab4d7068969dced2e698735407b1ffca38075 /src/backend/storage/ipc/sinval.c
parent37d937ea2c062093887e6aa03879166b6db06900 (diff)
downloadpostgresql-f009c316ba49857249611bc0d578c518c449879e.tar.gz
Tweak code so that pg_subtrans is never consulted for XIDs older than
RecentXmin (== MyProc->xmin). This ensures that it will be safe to truncate pg_subtrans at RecentGlobalXmin, which should largely eliminate any fear of bloat. Along the way, eliminate SubTransXidsHaveCommonAncestor, which isn't really needed and could not give a trustworthy result anyway under the lookback restriction. In an unrelated but nearby change, #ifdef out GetUndoRecPtr, which has been dead code since 2001 and seems unlikely to ever be resurrected.
Diffstat (limited to 'src/backend/storage/ipc/sinval.c')
-rw-r--r--src/backend/storage/ipc/sinval.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/storage/ipc/sinval.c b/src/backend/storage/ipc/sinval.c
index af046a3f1e..f28a883572 100644
--- a/src/backend/storage/ipc/sinval.c
+++ b/src/backend/storage/ipc/sinval.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/ipc/sinval.c,v 1.68 2004/08/15 17:03:36 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/ipc/sinval.c,v 1.69 2004/08/22 02:41:57 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -526,7 +526,7 @@ TransactionIdIsInProgress(TransactionId xid)
/*
* Don't bother checking a very old transaction.
*/
- if (TransactionIdPrecedes(xid, RecentGlobalXmin))
+ if (TransactionIdPrecedes(xid, RecentXmin))
{
xc_by_recent_xmin_inc();
return false;
@@ -912,6 +912,7 @@ CountActiveBackends(void)
return count;
}
+#ifdef NOT_USED
/*
* GetUndoRecPtr -- returns oldest PGPROC->logRec.
*/
@@ -947,6 +948,7 @@ GetUndoRecPtr(void)
return (urec);
}
+#endif /* NOT_USED */
/*
* BackendIdGetProc - given a BackendId, find its PGPROC structure