Thread: Can't start postgresql 8.3.7

Can't start postgresql 8.3.7

From
Sam Wun
Date:
Hi,

I had been running postgresql 8.3.7 in freebsd for some time, but
after I changed its postgresql.conf file, it can't start any more
eventhoguh I changed the config back to its original file.
Anything wrong?

Here is the errros:

Jun 26 15:58:52 twp1 postgres[1394]: [1-1] FATAL:  could not create
semaphores: No space left on device
Jun 26 15:58:52 twp1 postgres[1394]: [1-2] DETAIL:  Failed system call
was semget(5432004, 17, 03600).
Jun 26 15:58:52 twp1 postgres[1394]: [1-3] HINT:  This error does
*not* mean that you have run out of disk space.
Jun 26 15:58:52 twp1 postgres[1394]: [1-4]      It occurs when either
the system limit for the maximum number of semaphore sets (SEMMNI), or
the system wide maximum number of
Jun 26 15:58:52 twp1 postgres[1394]: [1-5]  semaphores (SEMMNS), would
be exceeded.  You need to raise the respective kernel parameter.
Alternatively, reduce PostgreSQL's
Jun 26 15:58:52 twp1 postgres[1394]: [1-6]  consumption of semaphores
by reducing its max_connections parameter (currently 103).
Jun 26 15:58:52 twp1 postgres[1394]: [1-7]      The PostgreSQL
documentation contains more information about configuring your system
for PostgreSQL.

Very appreciate for any suggestion.
Thanks

Re: Can't start postgresql 8.3.7

From
Sam Wun
Date:
I copied the sample config file to postgresql workign directory before
trying to start postgresql:
# pwd
/usr/local/share/postgresql
twp1:postgresql # cp postgresql.conf.sample ../../pgsql/data/postgresql.conf

On Fri, Jun 26, 2009 at 4:04 PM, Sam Wun<swun2010@gmail.com> wrote:
> Hi,
>
> I had been running postgresql 8.3.7 in freebsd for some time, but
> after I changed its postgresql.conf file, it can't start any more
> eventhoguh I changed the config back to its original file.
> Anything wrong?
>
> Here is the errros:
>
> Jun 26 15:58:52 twp1 postgres[1394]: [1-1] FATAL:  could not create
> semaphores: No space left on device
> Jun 26 15:58:52 twp1 postgres[1394]: [1-2] DETAIL:  Failed system call
> was semget(5432004, 17, 03600).
> Jun 26 15:58:52 twp1 postgres[1394]: [1-3] HINT:  This error does
> *not* mean that you have run out of disk space.
> Jun 26 15:58:52 twp1 postgres[1394]: [1-4]      It occurs when either
> the system limit for the maximum number of semaphore sets (SEMMNI), or
> the system wide maximum number of
> Jun 26 15:58:52 twp1 postgres[1394]: [1-5]  semaphores (SEMMNS), would
> be exceeded.  You need to raise the respective kernel parameter.
> Alternatively, reduce PostgreSQL's
> Jun 26 15:58:52 twp1 postgres[1394]: [1-6]  consumption of semaphores
> by reducing its max_connections parameter (currently 103).
> Jun 26 15:58:52 twp1 postgres[1394]: [1-7]      The PostgreSQL
> documentation contains more information about configuring your system
> for PostgreSQL.
>
> Very appreciate for any suggestion.
> Thanks
>

Re: Can't start postgresql 8.3.7

From
Tom Lane
Date:
Sam Wun <swun2010@gmail.com> writes:
> I had been running postgresql 8.3.7 in freebsd for some time, but
> after I changed its postgresql.conf file, it can't start any more
> eventhoguh I changed the config back to its original file.
> Anything wrong?

> Jun 26 15:58:52 twp1 postgres[1394]: [1-1] FATAL:  could not create
> semaphores: No space left on device

Apparently you changed the config in such a way that it no longer
recognizes the old set of semaphores as being ones it should recycle.
You need to get rid of the old SysV semaphore set.  The easy, foolproof
way to do that is to reboot.  If you can't reboot the machine, then use
ipcs and ipcrm to clean up manually.  If there's more than one Postgres
running on the system, be sure not to zap the semaphores belonging to
the other instances...

            regards, tom lane