*BSD News Article 89848


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!news.mel.connect.com.au!news.mel.aone.net.au!grumpy.fl.net.au!news.webspan.net!www.nntp.primenet.com!nntp.primenet.com!news.maxwell.syr.edu!insync!uunet!in2.uu.net!38.8.16.2!psinntp!newsjunkie.ans.net!newsfeeds.ans.net!lantana.singnet.com.sg!peony.singnet.com.sg!chenab.lums.edu.pk!chenab.lums.edu.pk!not-for-mail
From: aslam@lums.edu.pk (Sohail Aslam)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: shared memory (sysv semaphores etc) for postgres
Date: 20 Feb 1997 15:59:51 +0500
Organization: Lahore University of Management Sciences (LUMS)
Lines: 46
Message-ID: <5ehar7$mq7@chenab.lums.edu.pk>
NNTP-Posting-Host: chenab.lums.edu.pk
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:35909

I have installes PostgresSQL version 6.0 on a pentium machine running
FreeBSD 2.2-gamma. As predicted in PostgresSQL's FAQ, I got the

----------
binding ShmemCreate(key=9428cec, size=2361760)
IpcMemoryCreate: memKey=155356396,size=2361760,permission=384IpcMemoryCreate
: shmget(..., create, ...) failed: Cannot allocate memory
This type of error is usually caused by improper
shared memory or System V IPC semaphore configuration.
See the FAQ for more detailed information
-------------

The FAQ reads:

---------
You either do not have shared memory configured properly in kernel or you
need to enlarge the shared memory available in the kernel. The exact amount
you need depends on your architecture and how many buffers you configure
postmaster to run with. For most systems, with default buffer sizes, you
need a minimum of ~760K.
---------

I started the Postgres "postmaster" process with the default buffer
size of 64. 

I have the various SYSVSHMEM options turned on the kernel config file.
The command "ipcs -M" reports

shminfo:
        shmmax: 4194304 (max shared memory segment size)
        shmmin:       1 (min shared memory segment size)
        shmmni:      32 (max number of shared memory identifiers)
        shmseg:       8 (max shared memory segments per process)
        shmall:    1024 (max amount of shared memory in pages)

Are there any parameters I can (or should) increase so that Postgres
will not die? If so, where do I make the change? I couldn't find anything
in "sysctl".

Thanks

-- 
Sohail Aslam                   
Department of Computer Science, Lahore University of Management Sciences (LUMS)
Lahore, Pakistan    tel: 92-42-572-2670   fax: 92-42-572-2591
email: aslam@lums.edu.pk