diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-02-20 21:46:50 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-02-20 21:46:50 +0000 |
commit | 4aefe75553e6ec82b7308f961edd480d8001ec12 (patch) | |
tree | 77b6e32cbea54883f2d8ce3bfd189685c54d784c /src/backend/access/transam/transam.c | |
parent | 57e3b0c9db0778ef136b66917b82a57d61265b9d (diff) | |
download | postgresql-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/transam.c')
-rw-r--r-- | src/backend/access/transam/transam.c | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/src/backend/access/transam/transam.c b/src/backend/access/transam/transam.c index 8582a3c1be8..f88c25a37db 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.63 2004/12/31 21:59:29 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/transam.c,v 1.64 2005/02/20 21:46:48 tgl Exp $ * * NOTES * This file contains the high level access-method interface to the @@ -25,18 +25,6 @@ #include "utils/tqual.h" -/* ---------------- - * Flag indicating that we are bootstrapping. - * - * Transaction ID generation is disabled during bootstrap; we just use - * BootstrapTransactionId. Also, the transaction ID status-check routines - * are short-circuited; they claim that BootstrapTransactionId has already - * committed, allowing tuples already inserted to be seen immediately. - * ---------------- - */ -bool AMI_OVERRIDE = false; - - static XidStatus TransactionLogFetch(TransactionId transactionId); static void TransactionLogUpdate(TransactionId transactionId, XidStatus status); @@ -134,18 +122,6 @@ TransactionLogMultiUpdate(int nxids, TransactionId *xids, XidStatus status) TransactionIdSetStatus(xids[i], status); } -/* -------------------------------- - * AmiTransactionOverride - * - * This function is used to manipulate the bootstrap flag. - * -------------------------------- - */ -void -AmiTransactionOverride(bool flag) -{ - AMI_OVERRIDE = flag; -} - /* ---------------------------------------------------------------- * Interface functions * @@ -184,12 +160,6 @@ TransactionIdDidCommit(TransactionId transactionId) { XidStatus xidstatus; - if (AMI_OVERRIDE) - { - Assert(transactionId == BootstrapTransactionId); - return true; - } - xidstatus = TransactionLogFetch(transactionId); /* @@ -233,12 +203,6 @@ TransactionIdDidAbort(TransactionId transactionId) { XidStatus xidstatus; - if (AMI_OVERRIDE) - { - Assert(transactionId == BootstrapTransactionId); - return false; - } - xidstatus = TransactionLogFetch(transactionId); /* |