Re: Increasing Max Connections Mac OS 10.3

From: John Siracusa <siracusa(at)mindspring(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Increasing Max Connections Mac OS 10.3
Date: 2004-02-10 18:38:04
Message-ID: BC4E8F3C.2B5D0%siracusa@mindspring.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2/10/04 12:28 PM, Tom Lane wrote:
> Joe Lester <joe_lester(at)sweetwater(dot)com> writes:
>> Would this be kern.maxfiles?
>
> Sounds like what you want. There's probably no need to reduce
> maxfilesperproc (and thereby constrain every process not only PG
> backends). You can set PG's max_files_per_process instead.
>
>> Is it OK to set these before starting the server? Or should I set them
>> in /etc/rc?
>
> Damifino. Try a manual sysctl -w and see if it takes ... if not, you
> probably have to set it in /etc/rc.

You can set some of this stuff in /etc/sysctl.conf, which is sourced from
/etc/rc if it exists. The file format looks like this:

kern.maxproc=1000
kern.maxprocperuid=512
...

It just passes that stuff to sysctl -w (after skipping comments, etc.) See
the /etc/rc file for details.

Unfortunately, I've found that putting the shared memory settings in
/etc/sysctl.conf does not work. Instead, I put them in /etc/rc directly.
They're actually already there, just above the part that sources
/etc/sysctl.conf. (Look for the phease "System tuning" in a comment.) I
commented those out and put my own settings in their place. That seems to
work for me.

-John

In response to

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2004-02-10 19:06:43 Re: I want to use postresql for this app, but...
Previous Message Tom Lane 2004-02-10 18:30:23 Re: Increasing Max Connections Mac OS 10.3