max_connections, solaris semaphores and initdb

From: Isaac Vetter <ivetter(at)math(dot)purdue(dot)edu>
To: pgsql-novice(at)postgresql(dot)org
Subject: max_connections, solaris semaphores and initdb
Date: 2008-01-11 17:08:27
Message-ID: 4787A28B.3060309@math.purdue.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi pgsql experts;

I've been a little surprised at the high knowledge level of the
"novices" on this list, so if this isn't a novice question, let me know
and I'll send it to the regular list.

I'm running postgresql 7.4 on Solaris 9 and want to increase the value
of postgresql.conf's max_connections for an existing, running install.
I've edited /etc/system to what I think are more appropriate, but
definitely higher, values. Then I changed the value of max_connections
to 768; however, by watching the pg_stat_activity view and the
serverlog, connections are rejected when the number of connections
approaches 200 (with the infamous: "FATAL: connection limit exceeded
for non-superusers" error).

I ran across a mention of initdb determining the greatest possible
number of connections according to kernerl settings. So presumably, when
postgresql is first setup, the highest value of max_connections is
decided then.

A couple questions:
0) Is this correct? Does initdb set an unchaged value that quietly
limits the high end of max_connections?

1) Is there a way to get postgresql to reset this value that determines
the maximum value of max_connections, without dumping, re-running initdb
and loading? Is there a way to see what this value is?

2) Are there any easy postgresql load testing tools? I ran across Tsung,
but haven't had time to compile erlang. What do others do for load
testing?

Thanks,

Isaac Vetter

I had trouble finding recent example Solaris /etc/system numbers, so
I've included mine below. I'm still testing these are am not a solaris
sysadmin - ymmv.

* On an 8 gig sun4u running solaris 9
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=512
set shmsys:shminfo_shmseg=512
*semaphores
*max # of semaphores
set semsys:seminfo_semmns=2048
*max # of semaphore sets
set semsys:seminfo_semmni=1024
*max # of semaphores per set
set semsys:seminfo_semmsl=128

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2008-01-11 18:55:51 Re: max_connections, solaris semaphores and initdb
Previous Message johnf 2008-01-11 16:30:05 Re: Connecting to the database server