mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Ensure that all places that are complaining about exhaustion of shared
memory say 'out of shared memory'; some were doing that and some just said 'out of memory'. Also add a HINT about increasing max_locks_per_transaction where relevant, per suggestion from Sean Chittenden. (The former change does not break the strings freeze; the latter does, but I think it's worth doing anyway.)
This commit is contained in:
parent
2ec74435cd
commit
624292aa35
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.72 2003/09/25 06:58:02 petere Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.73 2003/10/16 20:59:35 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -167,7 +167,7 @@ ShmemAlloc(Size size)
|
|||||||
if (!newSpace)
|
if (!newSpace)
|
||||||
ereport(WARNING,
|
ereport(WARNING,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of memory")));
|
errmsg("out of shared memory")));
|
||||||
|
|
||||||
return newSpace;
|
return newSpace;
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ InitShmemIndex(void)
|
|||||||
if (!result)
|
if (!result)
|
||||||
ereport(FATAL,
|
ereport(FATAL,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of memory")));
|
errmsg("out of shared memory")));
|
||||||
|
|
||||||
Assert(ShmemBootstrap && !found);
|
Assert(ShmemBootstrap && !found);
|
||||||
|
|
||||||
@ -346,7 +346,7 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr)
|
|||||||
LWLockRelease(ShmemIndexLock);
|
LWLockRelease(ShmemIndexLock);
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of memory")));
|
errmsg("out of shared memory")));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.127 2003/08/17 22:41:12 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.128 2003/10/16 20:59:35 tgl Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Outside modules can create a lock table and acquire/release
|
* Outside modules can create a lock table and acquire/release
|
||||||
@ -476,8 +476,8 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag,
|
|||||||
LWLockRelease(masterLock);
|
LWLockRelease(masterLock);
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of memory")));
|
errmsg("out of shared memory"),
|
||||||
return FALSE;
|
errhint("You may need to increase max_locks_per_transaction.")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -524,8 +524,8 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag,
|
|||||||
LWLockRelease(masterLock);
|
LWLockRelease(masterLock);
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of memory")));
|
errmsg("out of shared memory"),
|
||||||
return FALSE;
|
errhint("You may need to increase max_locks_per_transaction.")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.135 2003/10/11 18:04:25 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.136 2003/10/16 20:59:35 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -151,7 +151,7 @@ InitProcGlobal(int maxBackends)
|
|||||||
if (!proc)
|
if (!proc)
|
||||||
ereport(FATAL,
|
ereport(FATAL,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of memory")));
|
errmsg("out of shared memory")));
|
||||||
MemSet(proc, 0, sizeof(PGPROC));
|
MemSet(proc, 0, sizeof(PGPROC));
|
||||||
PGSemaphoreCreate(&proc->sem);
|
PGSemaphoreCreate(&proc->sem);
|
||||||
proc->links.next = ProcGlobal->freeProcs;
|
proc->links.next = ProcGlobal->freeProcs;
|
||||||
@ -167,7 +167,7 @@ InitProcGlobal(int maxBackends)
|
|||||||
if (!DummyProc)
|
if (!DummyProc)
|
||||||
ereport(FATAL,
|
ereport(FATAL,
|
||||||
(errcode(ERRCODE_OUT_OF_MEMORY),
|
(errcode(ERRCODE_OUT_OF_MEMORY),
|
||||||
errmsg("out of memory")));
|
errmsg("out of shared memory")));
|
||||||
MemSet(DummyProc, 0, sizeof(PGPROC));
|
MemSet(DummyProc, 0, sizeof(PGPROC));
|
||||||
DummyProc->pid = 0; /* marks DummyProc as not in use */
|
DummyProc->pid = 0; /* marks DummyProc as not in use */
|
||||||
PGSemaphoreCreate(&DummyProc->sem);
|
PGSemaphoreCreate(&DummyProc->sem);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user