Re: max_connections, solaris semaphores and initdb - solved

From: Isaac Vetter <ivetter(at)math(dot)purdue(dot)edu>
To: pgsql-novice(at)postgresql(dot)org
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: max_connections, solaris semaphores and initdb - solved
Date: 2008-01-12 05:50:46
Message-ID: 47885536.6090506@math.purdue.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Kudos to Tom Lane for solving my problems.

Once I knew what the running instance's max_connections value was,
finding it hardcoded in the init script was easy. :)

I've embedded answers to my own questions below for future searchers.

Isaac Vetter

Isaac Vetter wrote:
> 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?
This is not correct.
> 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?
Runing 'show max_connections;' in pgsql will display this value.
> 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?
My impression is that people write their own and use the logging
settings in postgresql.conf

> 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2008-01-12 06:24:07 Re: max_connections, solaris semaphores and initdb - solved
Previous Message Tom Lane 2008-01-12 00:14:57 Re: max_connections, solaris semaphores and initdb