Re: max_connections, solaris semaphores and initdb

From: Isaac Vetter <ivetter(at)math(dot)purdue(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: max_connections, solaris semaphores and initdb
Date: 2008-01-11 20:51:52
Message-ID: 4787D6E8.80506@math.purdue.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Tom Lane wrote:
> Isaac Vetter <ivetter(at)math(dot)purdue(dot)edu> writes:
>> Yes. I've restarted. Even rebooted to have the /etc/system changes take
>> effect. My concern is that there's a value somewhere that quietly sets
>> an upper limit on what max_connections can be, that is determined from
>> kernel settings when initdb is run.
>
> Well, you're mistaken: if the system can't support the specified
> max_connections then it will fail at postmaster start, not silently
> reduce the parameter value.
>
> It's certainly possible to fall foul of a kernel process-count
> restriction at runtime, but the message would look like "fork failed",
> not the one you're reporting.

Hi Tom;

That's exactly the answer I hoped for. Thank you.

> I think you've messed up changing the effective setting of
> max_connections somehow. Are you sure you edited the right copy of
> postgresql.conf?

I considered this too, but I've made other changes to the same
postgresql.conf file that have taken effect (specifically, set
stats_command_string = true and now the pg_stat_activity query fields
contain data).

I had some tabs in front of some comments following the max_connections
definition. ?

The method I've been using to check the number of connections is by
running apache's benchmarking tool (ab) against a db heavy php page and
then watching serverlog for connection failures. Is there a way to check
the current value of max_connections from a running instance? (Or a
better way to load test postgresql?)

>> 0) Is this correct? Does initdb set an unchangeable value that quietly
>> limits the high end of max_connections?
>
> The only thing that initdb does is put a value for max_connections into
> the initial postgresql.conf file, which it chooses by experimenting to
> see whether the postmaster will start with various settings. No hidden
> magic.

Isaac Vetter

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Andrej Ricnik-Bay 2008-01-11 21:04:10 Re: Connecting to the database server
Previous Message Tom Lane 2008-01-11 20:20:11 Re: max_connections, solaris semaphores and initdb