*** pgsql/src/backend/access/transam/xact.c 2010/02/07 20:48:09 1.283 --- pgsql/src/backend/access/transam/xact.c 2010/02/08 04:33:53 1.284 *************** *** 10,16 **** * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.282 2010/01/24 21:49:17 tgl Exp $ * *------------------------------------------------------------------------- */ --- 10,16 ---- * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.283 2010/02/07 20:48:09 tgl Exp $ * *------------------------------------------------------------------------- */ *************** AtSubStart_ResourceOwner(void) *** 881,891 **** * * Returns latest XID among xact and its children, or InvalidTransactionId * if the xact has no XID. (We compute that here just because it's easier.) - * - * This is exported only to support an ugly hack in VACUUM FULL. */ ! TransactionId ! RecordTransactionCommit(bool isVacuumFull) { TransactionId xid = GetTopTransactionIdIfAny(); bool markXidCommitted = TransactionIdIsValid(xid); --- 881,889 ---- * * Returns latest XID among xact and its children, or InvalidTransactionId * if the xact has no XID. (We compute that here just because it's easier.) */ ! static TransactionId ! RecordTransactionCommit(void) { TransactionId xid = GetTopTransactionIdIfAny(); bool markXidCommitted = TransactionIdIsValid(xid); *************** RecordTransactionCommit(bool isVacuumFul *** 950,957 **** xlrec.xinfo = 0; if (RelcacheInitFileInval) xlrec.xinfo |= XACT_COMPLETION_UPDATE_RELCACHE_FILE; - if (isVacuumFull) - xlrec.xinfo |= XACT_COMPLETION_VACUUM_FULL; if (forceSyncCommit) xlrec.xinfo |= XACT_COMPLETION_FORCE_SYNC_COMMIT; --- 948,953 ---- *************** CommitTransaction(void) *** 1755,1761 **** /* * Here is where we really truly commit. */ ! latestXid = RecordTransactionCommit(false); TRACE_POSTGRESQL_TRANSACTION_COMMIT(MyProc->lxid); --- 1751,1757 ---- /* * Here is where we really truly commit. */ ! latestXid = RecordTransactionCommit(); TRACE_POSTGRESQL_TRANSACTION_COMMIT(MyProc->lxid); *************** xact_redo_commit(xl_xact_commit *xlrec, *** 4374,4401 **** LWLockRelease(XidGenLock); } ! if (!InHotStandby || XactCompletionVacuumFull(xlrec)) { /* * Mark the transaction committed in pg_clog. - * - * If InHotStandby and this is the first commit of a VACUUM FULL INPLACE - * we perform only the actual commit to clog. Strangely, there are two - * commits that share the same xid for every VFI, so we need to skip - * some steps for the first commit. It's OK to repeat the clog update - * when we see the second commit on a VFI. */ TransactionIdCommitTree(xid, xlrec->nsubxacts, sub_xids); } else { /* ! * If a transaction completion record arrives that has as-yet unobserved ! * subtransactions then this will not have been fully handled by the call ! * to RecordKnownAssignedTransactionIds() in the main recovery loop in ! * xlog.c. So we need to do bookkeeping again to cover that case. This is ! * confusing and it is easy to think this call is irrelevant, which has ! * happened three times in development already. Leave it in. */ RecordKnownAssignedTransactionIds(max_xid); --- 4370,4392 ---- LWLockRelease(XidGenLock); } ! if (!InHotStandby) { /* * Mark the transaction committed in pg_clog. */ TransactionIdCommitTree(xid, xlrec->nsubxacts, sub_xids); } else { /* ! * If a transaction completion record arrives that has as-yet ! * unobserved subtransactions then this will not have been fully ! * handled by the call to RecordKnownAssignedTransactionIds() in the ! * main recovery loop in xlog.c. So we need to do bookkeeping again to ! * cover that case. This is confusing and it is easy to think this ! * call is irrelevant, which has happened three times in development ! * already. Leave it in. */ RecordKnownAssignedTransactionIds(max_xid);