Skip to content
Snippets Groups Projects
Commit 624292aa authored by Tom Lane's avatar Tom Lane
Browse files

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.)
parent 2ec74435
Branches
Tags
No related merge requests found
......@@ -8,7 +8,7 @@
*
*
* 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)
ereport(WARNING,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of memory")));
errmsg("out of shared memory")));
return newSpace;
}
......@@ -226,7 +226,7 @@ InitShmemIndex(void)
if (!result)
ereport(FATAL,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of memory")));
errmsg("out of shared memory")));
Assert(ShmemBootstrap && !found);
......@@ -346,7 +346,7 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr)
LWLockRelease(ShmemIndexLock);
ereport(ERROR,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of memory")));
errmsg("out of shared memory")));
return NULL;
}
......
......@@ -8,7 +8,7 @@
*
*
* 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
* Outside modules can create a lock table and acquire/release
......@@ -476,8 +476,8 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag,
LWLockRelease(masterLock);
ereport(ERROR,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of memory")));
return FALSE;
errmsg("out of shared memory"),
errhint("You may need to increase max_locks_per_transaction.")));
}
/*
......@@ -524,8 +524,8 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag,
LWLockRelease(masterLock);
ereport(ERROR,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of memory")));
return FALSE;
errmsg("out of shared memory"),
errhint("You may need to increase max_locks_per_transaction.")));
}
/*
......
......@@ -8,7 +8,7 @@
*
*
* 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)
ereport(FATAL,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of memory")));
errmsg("out of shared memory")));
MemSet(proc, 0, sizeof(PGPROC));
PGSemaphoreCreate(&proc->sem);
proc->links.next = ProcGlobal->freeProcs;
......@@ -167,7 +167,7 @@ InitProcGlobal(int maxBackends)
if (!DummyProc)
ereport(FATAL,
(errcode(ERRCODE_OUT_OF_MEMORY),
errmsg("out of memory")));
errmsg("out of shared memory")));
MemSet(DummyProc, 0, sizeof(PGPROC));
DummyProc->pid = 0; /* marks DummyProc as not in use */
PGSemaphoreCreate(&DummyProc->sem);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment