Re: max_connections proposal - Mailing list pgsql-general

From Merlin Moncure
Subject Re: max_connections proposal
Date
Msg-id BANLkTiksvAjZ-=u=95v8FnM_+KhqezJxzA@mail.gmail.com
Whole thread Raw
In response to max_connections proposal  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
On Wed, May 25, 2011 at 10:58 PM, Craig Ringer
<craig@postnewspapers.com.au> wrote:
> There might be a very cheap and simple way to help reduce the number of
> people running into problems because they set massive max_connections values
> that their server cannot cope with instead of using pooling.
>
> In the default postgresql.conf, change:
>
> max_connections = 100                   # (change requires restart)
> # Note:  Increasing max_connections costs ~400 bytes of shared memory
> # per connection slot, plus lock space (see max_locks_per_transaction).
>
> to:
>
> max_connections = 100                   # (change requires restart)
> # WARNING: If you're about to increase max_connections above 100, you
> # should probably be using a connection pool instead. See:
> #     http://wiki.postgresql.org/max_connections
> #
> # Note:  Increasing max_connections costs ~400 bytes of shared memory
> # per connection slot, plus lock space (see max_locks_per_transaction).
> #
>
>
> ... where wiki.postgresql.org/max_connections (which doesn't yet exist)
> explains the throughput costs of too many backends and the advantages of
> configuring a connection pool instead.
>
> Sure, this somewhat contravenes the "users don't read - ever" principle, but
> we can hope that _some_ people will read a comment immediately beside the
> directive they're modifying.

+1 on this idea, although I'm not so sure it's a good idea to point to
the wiki.  Also, all other .conf explanation is in the standard docs,
so maybe this should be too.

merlin

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: PostgreSQL 8.4.8 bringing my website down every evening
Next
From: Ben Chobot
Date:
Subject: Re: temp files getting me down