summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/transam.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-09-16 18:35:23 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-09-16 18:35:23 +0000
commit86fff990b2acdbbfaf4340636878313fe270c916 (patch)
tree1bb9b083366b630a2a835f124b6ad3167b7ab86d /src/backend/access/transam/transam.c
parent8f9f1986034a2273e09ad10671e10d1adda21d1f (diff)
downloadpostgresql-86fff990b2acdbbfaf4340636878313fe270c916.tar.gz
RecentXmin is too recent to use as the cutoff point for accessing
pg_subtrans --- what we need is the oldest xmin of any snapshot in use in the current top transaction. Introduce a new variable TransactionXmin to play this role. Fixes intermittent regression failure reported by Neil Conway.
Diffstat (limited to 'src/backend/access/transam/transam.c')
-rw-r--r--src/backend/access/transam/transam.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/access/transam/transam.c b/src/backend/access/transam/transam.c
index f82168be5b..648fae1401 100644
--- a/src/backend/access/transam/transam.c
+++ b/src/backend/access/transam/transam.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/transam/transam.c,v 1.61 2004/08/29 05:06:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/transam.c,v 1.62 2004/09/16 18:35:20 tgl Exp $
*
* NOTES
* This file contains the high level access-method interface to the
@@ -200,15 +200,15 @@ TransactionIdDidCommit(TransactionId transactionId)
/*
* If it's marked subcommitted, we have to check the parent
- * recursively. However, if it's older than RecentXmin, we can't look
- * at pg_subtrans; instead assume that the parent crashed without
+ * recursively. However, if it's older than TransactionXmin, we can't
+ * look at pg_subtrans; instead assume that the parent crashed without
* cleaning up its children.
*/
if (xidstatus == TRANSACTION_STATUS_SUB_COMMITTED)
{
TransactionId parentXid;
- if (TransactionIdPrecedes(transactionId, RecentXmin))
+ if (TransactionIdPrecedes(transactionId, TransactionXmin))
return false;
parentXid = SubTransGetParent(transactionId);
Assert(TransactionIdIsValid(parentXid));
@@ -249,15 +249,15 @@ TransactionIdDidAbort(TransactionId transactionId)
/*
* If it's marked subcommitted, we have to check the parent
- * recursively. However, if it's older than RecentXmin, we can't look
- * at pg_subtrans; instead assume that the parent crashed without
+ * recursively. However, if it's older than TransactionXmin, we can't
+ * look at pg_subtrans; instead assume that the parent crashed without
* cleaning up its children.
*/
if (xidstatus == TRANSACTION_STATUS_SUB_COMMITTED)
{
TransactionId parentXid;
- if (TransactionIdPrecedes(transactionId, RecentXmin))
+ if (TransactionIdPrecedes(transactionId, TransactionXmin))
return true;
parentXid = SubTransGetParent(transactionId);
Assert(TransactionIdIsValid(parentXid));