Thread: installation problem - semaphores

installation problem - semaphores

From
Yadu
Date:
Hi,
I have installed postgre-sql in directory /usr/local1/postgres
Now, I am trying to run /usr/local1/postgres/bin/initdb -D /usr/local1/postgres/data
I got following error.


> initdb -D /usr/local1/postgres/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/local1/postgres/data ... ok
creating directory /usr/local1/postgres/data/global ... ok
creating directory /usr/local1/postgres/data/pg_xlog ... ok
creating directory /usr/local1/postgres/data/pg_xlog/archive_status ... ok
creating directory /usr/local1/postgres/data/pg_clog ... ok
creating directory /usr/local1/postgres/data/pg_subtrans ... ok
creating directory /usr/local1/postgres/data/base ... ok
creating directory /usr/local1/postgres/data/base/1 ... ok
creating directory /usr/local1/postgres/data/pg_tblspc ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 50
creating configuration files ... ok
creating template1 database in /usr/local1/postgres/data/base/1 ... FATAL:  could not create semaphores: No space left on device
DETAIL:  Failed system call was semget(1, 17, 03600).
HINT:  This error does *not* mean that you have run out of disk space.
        It occurs when either the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS), would be exceeded.  You need to raise the respective kernel parameter.  Alternatively, reduce PostgreSQL's consumption of semaphores by reducing its max_connections parameter (currently 10).
        The PostgreSQL documentation contains more information about configuring your system for PostgreSQL.
child process exited with exit code 1
initdb: removing contents of data directory "/usr/local1/postgres/data"



Since I am using Solaris OS, I may need to reboot the machine to change the value of semmns. I don't want to do that. How can I reduce the parameter max_connections and rerun the command?

Thank you,
Yadnyesh.


--
God is in details; specialization is god.

Re: installation problem - semaphores

From
Tom Lane
Date:
Yadu <yaduonline@gmail.com> writes:
> selecting default max_connections ... 10
> selecting default shared_buffers ... 50
> creating configuration files ... ok
> creating template1 database in /usr/local1/postgres/data/base/1 ... FATAL:
> could not create semaphores: No space left on device
> DETAIL:  Failed system call was semget(1, 17, 03600).
> HINT:  This error does *not* mean that you have run out of disk space.
>         It occurs when either the system limit for the maximum number of
> semaphore sets (SEMMNI), or the system wide maximum number of semaphores
> (SEMMNS), would be exceeded.  You need to raise the respective kernel
> parameter.  Alternatively, reduce PostgreSQL's consumption of semaphores by
> reducing its max_connections parameter (currently 10).
>         The PostgreSQL documentation contains more information about
> configuring your system for PostgreSQL.

> Since I am using Solaris OS, I may need to reboot the machine to change the
> value of semmns. I don't want to do that. How can I reduce the parameter
> max_connections and rerun the command?

initdb has already reduced it as far as is sane, if not further.  (The
underlying implementation is such that values less than 16 don't
actually reduce the number of semaphores we acquire.)  You'll have to do
whatever is needed to fix the kernel limit.  Don't forget to look at the
shared memory limit while you're at it; it's likely that that's
unreasonably small, too.

            regards, tom lane

Re: installation problem - semaphores

From
Luca Pireddu
Date:
On April 2, 2006 10:35, Tom Lane wrote:
> Yadu <yaduonline@gmail.com> writes:
> > selecting default max_connections ... 10
> > selecting default shared_buffers ... 50
> > creating configuration files ... ok
> > creating template1 database in /usr/local1/postgres/data/base/1 ...
> > FATAL: could not create semaphores: No space left on device
> > DETAIL:  Failed system call was semget(1, 17, 03600).
> > HINT:  This error does *not* mean that you have run out of disk space.
> >         It occurs when either the system limit for the maximum number of
> > semaphore sets (SEMMNI), or the system wide maximum number of semaphores
> > (SEMMNS), would be exceeded.  You need to raise the respective kernel
> > parameter.  Alternatively, reduce PostgreSQL's consumption of semaphores
> > by reducing its max_connections parameter (currently 10).
> >         The PostgreSQL documentation contains more information about
> > configuring your system for PostgreSQL.
> >
> > Since I am using Solaris OS, I may need to reboot the machine to change
> > the value of semmns. I don't want to do that. How can I reduce the
> > parameter max_connections and rerun the command?
>
> initdb has already reduced it as far as is sane, if not further.  (The
> underlying implementation is such that values less than 16 don't
> actually reduce the number of semaphores we acquire.)  You'll have to do
> whatever is needed to fix the kernel limit.  Don't forget to look at the
> shared memory limit while you're at it; it's likely that that's
> unreasonably small, too.
>
>             regards, tom lane

You might not need to reboot.  You can change resource limits with the prctl
command.  Check out the posts by t_altamimi on this thread
http://forums.oracle.com/forums/message.jspa?messageID=1077746

Luca

Re: installation problem - semaphores

From
"fufay"
Date:
u have to "su postgres" first,just like this:
--------------------------------------------------------------
# rehash
# su postgres
postgres$ initdb -D /usr/local1/pgsql/data
------------------------------------------------
good luck!

"Yadu" <yaduonline@gmail.com> ????
news:5d48001d0604020327m3cd56f1dq94605ce68cd69e0d@mail.gmail.com...
Hi,
I have installed postgre-sql in directory /usr/local1/postgres
Now, I am trying to run /usr/local1/postgres/bin/initdb -D
/usr/local1/postgres/data
I got following error.


> initdb -D /usr/local1/postgres/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/local1/postgres/data ... ok
creating directory /usr/local1/postgres/data/global ... ok
creating directory /usr/local1/postgres/data/pg_xlog ... ok
creating directory /usr/local1/postgres/data/pg_xlog/archive_status ... ok
creating directory /usr/local1/postgres/data/pg_clog ... ok
creating directory /usr/local1/postgres/data/pg_subtrans ... ok
creating directory /usr/local1/postgres/data/base ... ok
creating directory /usr/local1/postgres/data/base/1 ... ok
creating directory /usr/local1/postgres/data/pg_tblspc ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 50
creating configuration files ... ok
creating template1 database in /usr/local1/postgres/data/base/1 ... FATAL:
could not create semaphores: No space left on device
DETAIL:  Failed system call was semget(1, 17, 03600).
HINT:  This error does *not* mean that you have run out of disk space.
        It occurs when either the system limit for the maximum number of
semaphore sets (SEMMNI), or the system wide maximum number of semaphores
(SEMMNS), would be exceeded.  You need to raise the respective kernel
parameter.  Alternatively, reduce PostgreSQL's consumption of semaphores by
reducing its max_connections parameter (currently 10).
        The PostgreSQL documentation contains more information about
configuring your system for PostgreSQL.
child process exited with exit code 1
initdb: removing contents of data directory "/usr/local1/postgres/data"



Since I am using Solaris OS, I may need to reboot the machine to change the
value of semmns. I don't want to do that. How can I reduce the parameter
max_connections and rerun the command?

Thank you,
Yadnyesh.


--
God is in details; specialization is god.