1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

1. xact.c: update comments about changing MyProc->xid and MyProc->xmin.

2. varsup.c:ReadNewTransactionId(): don't read nextXid from disk -
   this func doesn't allocate next xid, so ShmemVariableCache->nextXid
   may be used (but GetNewTransactionId() must be called first).
3. vacuum.c: change elog(ERROR, "Child item....") to elog(NOTICE) -
   this is not ERROR, proper handling is just not implemented, yet.
4. s_lock.c: increase S_MAX_BUSY by 2 times.
5. shmem.c:GetSnapshotData(): have to call ReadNewTransactionId()
   _after_ SpinAcquire(ShmemIndexLock).
This commit is contained in:
Vadim B. Mikheev
1999-06-06 20:19:35 +00:00
parent 48c1887964
commit 1b812d9358
5 changed files with 44 additions and 26 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.20 1999/05/25 22:04:32 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.21 1999/06/06 20:19:35 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,7 +28,7 @@
* note: total time to cycle through all 16 entries might be about .07 sec.
*/
#define S_NSPINCYCLE 20
#define S_MAX_BUSY 500 * S_NSPINCYCLE
#define S_MAX_BUSY 1000 * S_NSPINCYCLE
int s_spincycle[S_NSPINCYCLE] =
{0, 0, 0, 0, 10000, 0, 0, 0, 10000, 0,

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.41 1999/06/03 13:33:13 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.42 1999/06/06 20:19:35 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@@ -652,9 +652,15 @@ GetSnapshotData(bool serializable)
snapshot->xip = (TransactionId *) malloc(have * sizeof(TransactionId));
snapshot->xmin = cid;
ReadNewTransactionId(&(snapshot->xmax));
SpinAcquire(ShmemIndexLock);
/*
* Unfortunately, we have to call ReadNewTransactionId()
* after acquiring ShmemIndexLock above. It's not good because of
* ReadNewTransactionId() does SpinAcquire(OidGenLockId) but
* _necessary_.
*/
ReadNewTransactionId(&(snapshot->xmax));
hash_seq((HTAB *) NULL);
while ((result = (ShmemIndexEnt *) hash_seq(ShmemIndex)) != NULL)