Re: initdb memory segment creation error - Mailing list pgsql-general

From questions
Subject Re: initdb memory segment creation error
Date
Msg-id db346c9d0809111608k62227ad1t9bb773bd30ab0b81@mail.gmail.com
Whole thread Raw
In response to Re: initdb memory segment creation error  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: initdb memory segment creation error
List pgsql-general

I have few other applications running on my machine but they all don't use more than 60MB. I checked and SHMALL is in pages. I also reduced shared_buffers and max_connections but that didn't help. Also I did ipcs after I got the error and following is what I got - 

T           ID          KEY   MODE    OWNER GROUP  NATTCH    SEGSZ         CPID         LPID ATIME    DTIME    CTIME
m       131072            2 --rw-------    pgsql    pgsql            0      6242304        67055        67055 14:13:34 14:13:34 14:13:34
m       131073            3 --rw-------    pgsql    pgsql            0      5234688        67057        67057 14:14:02 14:14:02 14:14:02
m       131074            4 --rw-------    pgsql    pgsql            0      4235264        67059        67059 14:14:30 14:14:30 14:14:30
m       131075            5 --rw-------    pgsql    pgsql            0      3203072        67061        67061 14:14:57 14:14:57 14:14:57
m       131076            6 --rw-------    pgsql    pgsql            0      2203648        67063        67063 14:15:25 14:15:25 14:15:25
m       131077            7 --rw-------    pgsql    pgsql            0      1687552        67072        67072 14:15:54 14:15:54 14:15:54
m       131078            8 --rw-------    pgsql    pgsql            0     36478976        67074        67074 14:16:22 14:16:22 14:16:22
m       131079            9 --rw-------    pgsql    pgsql            0      9592832        67086        67086 14:19:10 14:19:10 14:19:10
m       131080           10 --rw-------    pgsql    pgsql            0      1687552        67137        67137 14:23:50 14:23:50 14:23:50
m       131119            1 --rw-------    pgsql    pgsql            0     11321344        67053        67053 14:13:07 14:13:07 14:13:07

Postgres did create, attach, detach shared segments but did'nt delete them. I think these processes were forked by postmaster but why so many were created? and why those segments not reported?

Thanks,
Fahad

On Thu, Sep 11, 2008 at 5:20 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
questions <questions.612@gmail.com> writes:
> I am getting this error with initdb while creating shared segment -
> "memory segment exceeded available memory or swap space.  To reduce the
> request size (currently 1785856 bytes), reduce PostgreSQL's shared_buffers
> parameter (currently 50)) and/or its max_connections parameter (currently
> 13)."
> Total memory is 256 MB and memory available to user processes is 178 MB.
> It's not an issue with shared segment exceeding SHMMAX but value of SHMMAX
> is 67108864 and SHMALL is 8192. It is not exactly a Postgresql problem but
> what am I missing here?

Hm, what else is running on the box?  PG itself should fit in 256MB but
if you've got other stuff hogging memory, you might have little choice
but to buy more RAM.

(You should also double-check what SHMALL is measured in on your
platform; maybe that 8192 isn't pages but bytes ...)

                       regards, tom lane

pgsql-general by date:

Previous
From: Ron Mayer
Date:
Subject: Re: PostgreSQL TPC-H test result?
Next
From: Ron Mayer
Date:
Subject: Re: PostgreSQL TPC-H test result?