Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 1999 11:08:14 -0700 (PDT)
From:      Doug White <dwhite@resnet.uoregon.edu>
To:        Andy Widodo <a_widodo@natrindo.co.id>
Cc:        questions@freebsd.org
Subject:   Re: Problem on IPC/Shared memory
Message-ID:  <Pine.BSF.4.03.9906171104190.27248-100000@resnet.uoregon.edu>
In-Reply-To: <004b01beb8af$489a1e40$d22110ac@andywidodo>

next in thread | previous in thread | raw e-mail | index | archive | help
This belongs on -questions, not -FAQ.

On Thu, 17 Jun 1999, Andy Widodo wrote:

> Hardware : Pentium II /400
>                    196 MB RAM
> O/S          : FreeBSD 3.2
> DBMS     : PostgreSQL 6.3
> 
> While the application is running, we encountered problem:
>         The Postgres's POSTMASTER was aborted, and the message written on
> the Postgres.log was:
> 
> =========================================
> ERROR:  Relation user_acct does not have attribute outgoing_abrred
> Failed Assertion("!(attnum <= 0 || (attnum - 1 <= tuple_type->natts - 1 &&
> tuple_type->attrs[attnum - 1] != 0 && variable->vartype ==
> tuple_type->attrs[attnum - 1]->atttypid)):", File: "execQual.c", Line: 279)
> !(attnum <= 0 || (attnum - 1 <= tuple_type->natts - 1 &&
> tuple_type->attrs[attnum - 1] != 0 && variable->vartype ==
> tuple_type->attrs[attnum - 1]->atttypid)) (0) [Operation not supported by
> device]
> 
> NOTICE:  Message from PostgreSQL backend:
>         The Postmaster has informed me that some other backend died
> abnormally and possibly corrupted shared memory.
>         I have rolled back the current transaction and am going to terminate
> your database system connection and exit.
> 
>         Please reconnect to the database system and repeat your query.
> 
> IpcMemoryCreate: memKey=5432101 , size=2361552 ,
> permission=384IpcMemoryCreate: shmget(..., create, ...) failed: Cannot
> allocate memory                                                 ^^^^^^
  ^^^^^^^^^^^^^^^

If your machine is trying to tell you something, you should listen.

> This type of error is usually caused by improper shared memory or System V
> IPC semaphore configuration.

.. or running out of RAM or swap.  It tried to allocate a 2.3MB chunk.
If this happens after a long while, you may want to monitor SYSV IPC
memory usage using the ipcs(1) utility.  PostgreSQL may be leaking
segments.

> In the kernel configuration, we already add the tree lines:
> 
>         options    SYSVSHM
>         options    SYSVSEM          # enable for semaphores
>         options    SYSVMSG          # enable for messaging
> 
> I check the FAQ :  8.17. Does FreeBSD support System V IPC primitives?
>         Stated that the below option for shared memory should be added.
> 
>         ( options    "SHMMAXPGS=64"   # 256Kb of sharable memory )

You may want more than that.  Check the mail archives for hints; 256k
doesn't sound like near enough.

> 1. In our case, do we need to add the option "SHMMAXPGS"?

Did you try it without that option?  The default may be suitable.

> 2. How big is the shared memory should be set?
> 3. How to FIX the above error / problem ?

Doug White                               
Internet:  dwhite@resnet.uoregon.edu    | FreeBSD: The Power to Serve
http://gladstone.uoregon.edu/~dwhite    | www.freebsd.org



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.03.9906171104190.27248-100000>