Skip site navigation (1) Skip section navigation (2)

Re: PG versus FreeBSD, startup and connections problems

From: Mark Kirkwood <markir(at)coretech(dot)co(dot)nz>
To: Mitch Pirtle <mitch(dot)pirtle(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: PG versus FreeBSD, startup and connections problems
Date: 2005-01-25 21:08:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance

Mitch Pirtle wrote:

>1) freebsd will only let PostgreSQL have 38 connections at a time,
>regardless of kernel settings or postgresql.conf settings. Where
>exactly (and how, exactly) does one remedy that problem?
What version of FreeBSD is the box running?
Generally you need to change semaphores and shared memory settings, e.g. 
for 5.x or late 4.x :

in /etc/sysctl.conf :
(can be set online using systcl -w)

Semaphores need to be set in /boot/loader.conf
(can typed at the loader prompt using set)

These settings should let you have ~100 connections and use about 100M 
of shared memory for shared_buffers.

Early 4.x (I think)  and before will need a kernel rebuild, see

>2) As of this morning, the machine was down again, this time apache
>fired up normally but pg refuses to start - without errors. When I
>start with postmaster on the CLI I also get no errors, just no
>postmaster. Why am I not seeing the errors, is this a FreeBSD or
>PostgreSQL issue?
>For example:
>$ pg_ctl start
>postmaster successfully started
>$ pg_ctl status
>pg_ctl: postmaster or postgres not running
>$ postmaster -D /usr/local/pgsql/data
>(no response)
BTW - What version of Pg are you using?
Check your postgresql.conf to see if all the output is going to syslog, e.g,
If not, then unfortunately it is possible that whatever is causing the 
machine to be unstable has corrupted the data directory (so ...err... 
restore time). Starting the postmaster in debug mode will provide more 
$ postmaster -d 5
Additionally utilitites like 'strace' will give you a bit more info 
about where the startup process gets to.

Do you know why the box went down? The freebsd-bugs or freebsd-stable 
list will help with respect to Freebsd crashing, see



In response to


pgsql-performance by date

Next:From: Christopher BrowneDate: 2005-01-25 21:46:48
Subject: Re: PostgreSQL vs. Oracle vs. Microsoft
Previous:From: Litao WuDate: 2005-01-25 18:48:08
Subject: Re: reltuples after vacuum and analyze

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group