shared memory on OS X - 7.4beta4

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vivek Khera

    #16
    Re: shared memory on OS X - 7.4beta4

    >>>>> "JC" == Jim Crate <jcrate@deepsky tech.com> writes:

    JC> Now to figure out why sysctl -w
    JC> kern.sysv.shmma x=<some_reasona ble_value> doesn't seem to work on
    JC> 10.3...

    I believe you must do it at boot time, not after. ie, it must be done
    by one of the startup scripts.


    --
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Vivek Khera, Ph.D. Khera Communications, Inc.
    Internet: khera@kciLink.c om Rockville, MD +1-240-453-8497
    AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/

    ---------------------------(end of broadcast)---------------------------
    TIP 6: Have you searched our list archives?



    Comment

    • Tom Lane

      #17
      Re: shared memory on OS X - 7.4beta4

      John DeSoi <jd@icx.net> writes:[color=blue]
      > OK, I compiled beta 5 and put my rest SHMMAX back to the default
      > settings as provided by OS X. Still the same error:[/color]
      [color=blue]
      > FATAL: could not create shared memory segment: Invalid argument
      > DETAIL: Failed system call was shmget(key=5432 001, size=10444800,
      > 03600).
      > HINT: This error usually means that PostgreSQL's request for a shared
      > memory segment exceeded your kernel's SHMMAX parameter. You can either
      > reduce the request size or reconfigure the kernel with larger SHMMAX.
      > To reduce the request size (currently 10444800 bytes), reduce
      > PostgreSQL's shared_buffers parameter (currently 1000) and/or its
      > max_connections parameter (currently 100).[/color]

      There is something very wrong here. On my OS X machine, initdb selects
      non-default shared_buffers and max_connections (300 and 50 respectively,
      when using 7.4beta5). Why is that failing to happen on yours? I can
      see two possibilities: either initdb is failing to notice that it needs
      smaller-than-default values, or it's somehow failing to insert those
      values into the constructed postgresql.conf file. You could determine
      which is happening by looking at the output of initdb to see what it
      reports.

      [ thinks for a bit... ] Hmm. You *are* using the postgresql.conf file
      that initdb built, aren't you?

      regards, tom lane

      ---------------------------(end of broadcast)---------------------------
      TIP 8: explain analyze is your friend

      Comment

      • John DeSoi

        #18
        Re: shared memory on OS X - 7.4beta4


        On Tuesday, October 28, 2003, at 03:13 PM, Tom Lane wrote:
        [color=blue]
        > There is something very wrong here. On my OS X machine, initdb selects
        > non-default shared_buffers and max_connections (300 and 50
        > respectively,
        > when using 7.4beta5). Why is that failing to happen on yours? I can
        > see two possibilities: either initdb is failing to notice that it needs
        > smaller-than-default values, or it's somehow failing to insert those
        > values into the constructed postgresql.conf file. You could determine
        > which is happening by looking at the output of initdb to see what it
        > reports.[/color]

        I set the memory parameters back to their defaults, and now: it works.
        I'm getting 300 and 50 with initdb. I don't recall what the output form
        initdb was from previous attempts, but the .conf file always had 1000
        and 100.

        [color=blue]
        >
        > [ thinks for a bit... ] Hmm. You *are* using the postgresql.conf file
        > that initdb built, aren't you?[/color]

        I have never changed anything in this file (or replaced it). I did not
        even know what the shared_buffers parameter was for until I ran into
        this problem.

        What version of OS X are you running? I thought I replicated the
        problem after upgrading to 10.2.8, but now I'm not certain I ran initdb
        again (I may have just rebuilt beta 5). So possibly it could be a
        difference between 10.2.6 and 10.2.8. If not, I have no clue. I'll
        report back if I find anything.

        Best,

        John DeSoi, Ph.D.


        ---------------------------(end of broadcast)---------------------------
        TIP 7: don't forget to increase your free space map settings

        Comment

        • Tom Lane

          #19
          Re: shared memory on OS X - 7.4beta4

          John DeSoi <jd@icx.net> writes:[color=blue]
          > What version of OS X are you running? I thought I replicated the
          > problem after upgrading to 10.2.8, but now I'm not certain I ran initdb
          > again (I may have just rebuilt beta 5). So possibly it could be a
          > difference between 10.2.6 and 10.2.8. If not, I have no clue. I'll
          > report back if I find anything.[/color]

          I'm running 10.2.6 (a pretty fresh install, see prior bellyaching about
          hardware problems with my laptop ;-)). IIRC, someone else reported
          success with a clean 10.2.8 installation in this thread. I have also
          checked PG against a 10.3 beta recently, and so have other people.
          It's fairly likely that there are problems with 10.1, if anyone still
          uses that, but I have no reason to think that PG 7.4 will fail with
          either 10.2.* or 10.3.

          regards, tom lane

          ---------------------------(end of broadcast)---------------------------
          TIP 4: Don't 'kill -9' the postmaster

          Comment

          Working...