1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-30 06:01:21 +03:00

SET TRANSACTION ISOLATION LEVEL ...

LOCK TABLE IN ... MODE
...implemented
This commit is contained in:
Vadim B. Mikheev
1998-12-18 09:10:39 +00:00
parent c7da80bb9a
commit 3498d878cb
19 changed files with 6953 additions and 6516 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.17 1998/09/01 04:27:18 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.18 1998/12/18 09:10:17 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@@ -311,6 +311,42 @@ GetNewTransactionId(TransactionId *xid)
SpinRelease(OidGenLockId);
}
/*
* Like GetNewTransactionId reads nextXid but don't fetch it.
*/
void
ReadNewTransactionId(TransactionId *xid)
{
/* ----------------
* during bootstrap initialization, we return the special
* bootstrap transaction id.
* ----------------
*/
if (AMI_OVERRIDE)
{
TransactionIdStore(AmiTransactionId, xid);
return;
}
SpinAcquire(OidGenLockId); /* not good for concurrency... */
if (ShmemVariableCache->xid_count == 0)
{
TransactionId nextid;
VariableRelationGetNextXid(&nextid);
TransactionIdStore(nextid, &(ShmemVariableCache->nextXid));
ShmemVariableCache->xid_count = VAR_XID_PREFETCH;
TransactionIdAdd(&nextid, VAR_XID_PREFETCH);
VariableRelationPutNextXid(nextid);
}
TransactionIdStore(ShmemVariableCache->nextXid, xid);
SpinRelease(OidGenLockId);
}
/* ----------------------------------------------------------------
* object id generation support
* ----------------------------------------------------------------