Re: max_connections, solaris semaphores and initdb - Mailing list pgsql-novice

From Isaac Vetter
Subject Re: max_connections, solaris semaphores and initdb
Date
Msg-id 4787D6E8.80506@math.purdue.edu
Whole thread Raw
In response to Re: max_connections, solaris semaphores and initdb  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: max_connections, solaris semaphores and initdb  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Tom Lane wrote:
> Isaac Vetter <ivetter@math.purdue.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

Attachment

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: max_connections, solaris semaphores and initdb
Next
From: "Andrej Ricnik-Bay"
Date:
Subject: Re: Connecting to the database server