Thread: OS X shared memory problems 8.0rc3
I just downloaded and installed RC3 on my OS X system (10.3.7), and I'm getting a shared memory error when trying to run initdb (error message listed below). I received a similar error a few weeks ago after upgrading my OS to 10.3.7, but I was able to get around that by reducing the shared_buffers setting in postgresql.conf. I'm not sure how to work around this one, though, since I'm starting from scratch and the error is coming from initdb. What is the best way to correct this situation? Any help would be appreciated! Thanks, Tim Error message from initdb: /usr/local/pgsql tperrigo$ sudo -u postgres initdb --encoding=UNICODE /usr/local/pgsql/data The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale C. fixing permissions on existing directory /usr/local/pgsql/data ... ok creating directory /usr/local/pgsql/data/global ... ok creating directory /usr/local/pgsql/data/pg_xlog ... ok creating directory /usr/local/pgsql/data/pg_xlog/archive_status ... ok creating directory /usr/local/pgsql/data/pg_clog ... ok creating directory /usr/local/pgsql/data/pg_subtrans ... ok creating directory /usr/local/pgsql/data/base ... ok creating directory /usr/local/pgsql/data/base/1 ... ok creating directory /usr/local/pgsql/data/pg_tblspc ... ok selecting default max_connections ... 10 selecting default shared_buffers ... 50 creating configuration files ... ok creating template1 database in /usr/local/pgsql/data/base/1 ... FATAL: could not create shared memory segment: Cannot allocate memory DETAIL: Failed system call was shmget(key=1, size=1155072, 03600). HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space. To reduce the request size (currently 1155072 bytes), reduce PostgreSQL's shared_buffers parameter (currently 50) and/or its max_connections parameter (currently 10). The PostgreSQL documentation contains more information about shared memory configuration.
Timothy Perrigo <tperrigo@wernervas.com> writes: > I just downloaded and installed RC3 on my OS X system (10.3.7), and I'm > getting a shared memory error when trying to run initdb (error message > listed below). I received a similar error a few weeks ago after > upgrading my OS to 10.3.7, but I was able to get around that by > reducing the shared_buffers setting in postgresql.conf. I think you probably are trying to run two postmasters at once. You really need to increase the OS X memory limits, instead. regards, tom lane
On Jan 2, 2005, at 12:58 PM, Tom Lane wrote: > Timothy Perrigo <tperrigo@wernervas.com> writes: >> I just downloaded and installed RC3 on my OS X system (10.3.7), and >> I'm >> getting a shared memory error when trying to run initdb (error message >> listed below). I received a similar error a few weeks ago after >> upgrading my OS to 10.3.7, but I was able to get around that by >> reducing the shared_buffers setting in postgresql.conf. > > I think you probably are trying to run two postmasters at once. You > really need to increase the OS X memory limits, instead. > > regards, tom lane > No, I just ran pg_ctl status to check, and here was the output: pg_ctl: neither postmaster nor postgres running I then ran initdb, and got the error message I posted before. I only want to run 1 postmaster at a time...any ideas? Thanks, Tim
Timothy Perrigo <tperrigo@wernervas.com> writes: > On Jan 2, 2005, at 12:58 PM, Tom Lane wrote: >> I think you probably are trying to run two postmasters at once. You >> really need to increase the OS X memory limits, instead. > No, I just ran pg_ctl status to check, and here was the output: > pg_ctl: neither postmaster nor postgres running Proves only that you weren't running another postmaster in the same data directory. Try "ps auxww | grep post" regards, tom lane
On Jan 2, 2005, at 8:31 PM, Tom Lane wrote: > Timothy Perrigo <tperrigo@wernervas.com> writes: >> On Jan 2, 2005, at 12:58 PM, Tom Lane wrote: >>> I think you probably are trying to run two postmasters at once. You >>> really need to increase the OS X memory limits, instead. > >> No, I just ran pg_ctl status to check, and here was the output: >> pg_ctl: neither postmaster nor postgres running > > Proves only that you weren't running another postmaster in the same > data > directory. Try "ps auxww | grep post" > > regards, tom lane > > Thanks...that was it! There was another postmaster running in a different data directory. My apologies for not checking this first. Tim