aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xact.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-02-20 21:46:50 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-02-20 21:46:50 +0000
commit4aefe75553e6ec82b7308f961edd480d8001ec12 (patch)
tree77b6e32cbea54883f2d8ce3bfd189685c54d784c /src/backend/access/transam/xact.c
parent57e3b0c9db0778ef136b66917b82a57d61265b9d (diff)
downloadpostgresql-4aefe75553e6ec82b7308f961edd480d8001ec12.tar.gz
postgresql-4aefe75553e6ec82b7308f961edd480d8001ec12.zip
Remove some no-longer-needed kluges for bootstrapping, in particular
the AMI_OVERRIDE flag. The fact that TransactionLogFetch treats BootstrapTransactionId as always committed is sufficient to make bootstrap work, and getting rid of extra tests in heavily used code paths seems like a win. The files produced by initdb are demonstrably the same after this change.
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r--src/backend/access/transam/xact.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 5813faeea75..5c84bb99554 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.196 2005/02/20 02:21:28 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.197 2005/02/20 21:46:48 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -450,22 +450,23 @@ GetCurrentTransactionNestLevel(void)
/*
* TransactionIdIsCurrentTransactionId
- *
- * During bootstrap, we cheat and say "it's not my transaction ID" even though
- * it is. Along with transam.c's cheat to say that the bootstrap XID is
- * already committed, this causes the tqual.c routines to see previously
- * inserted tuples as committed, which is what we need during bootstrap.
*/
bool
TransactionIdIsCurrentTransactionId(TransactionId xid)
{
TransactionState s;
- if (AMI_OVERRIDE)
- {
- Assert(xid == BootstrapTransactionId);
+ /*
+ * We always say that BootstrapTransactionId is "not my transaction ID"
+ * even when it is (ie, during bootstrap). Along with the fact that
+ * transam.c always treats BootstrapTransactionId as already committed,
+ * this causes the tqual.c routines to see all tuples as committed,
+ * which is what we need during bootstrap. (Bootstrap mode only inserts
+ * tuples, it never updates or deletes them, so all tuples can be presumed
+ * good immediately.)
+ */
+ if (xid == BootstrapTransactionId)
return false;
- }
/*
* We will return true for the Xid of the current subtransaction, any