*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.20 1999/05/25 16:07:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.21 1999/06/03 04:41:40 vadim Exp $
*
*-------------------------------------------------------------------------
*/
#include <access/xact.h>
#include <access/heapam.h>
#include <catalog/catname.h>
+#include <storage/proc.h>
static void GetNewObjectIdBlock(Oid *oid_return, int oid_block_size);
static void VariableRelationGetNextOid(Oid *oid_return);
TransactionIdAdd(&(ShmemVariableCache->nextXid), 1);
(ShmemVariableCache->xid_count)--;
+ if (MyProc != (PROC *) NULL)
+ MyProc->xid = *xid;
+
SpinRelease(OidGenLockId);
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.37 1999/05/31 22:53:59 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.38 1999/06/03 04:41:41 vadim Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
FlushBufferPool(!TransactionFlushEnabled());
if (leak)
ResetBufferPool();
+
+ /*
+ * Let others know about no transaction in progress.
+ * Note that this must be done _before_ releasing locks
+ * we hold or bad (too high) XmaxRecent value might be
+ * used by vacuum.
+ */
+ if (MyProc != (PROC *) NULL)
+ {
+ MyProc->xid = InvalidTransactionId;
+ MyProc->xmin = InvalidTransactionId;
+ }
}
*/
s->state = TRANS_INPROGRESS;
- /*
- * Let others to know about current transaction is in progress - vadim
- * 11/26/96
- */
- if (MyProc != (PROC *) NULL)
- MyProc->xid = s->transactionIdData;
-
}
/* ---------------
*/
s->state = TRANS_DEFAULT;
- /*
- * Let others to know about no transaction in progress - vadim
- * 11/26/96
- */
- if (MyProc != (PROC *) NULL)
- {
- MyProc->xid = InvalidTransactionId;
- MyProc->xmin = InvalidTransactionId;
- }
}
/* --------------------------------