Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-10 Thread John Siracusa
On 2/10/04 12:28 PM, Tom Lane wrote: > Joe Lester <[EMAIL PROTECTED]> 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 i

Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-10 Thread Joe Lester
Would this be kern.maxfiles? There's also one called kern.maxfilesperproc. Is it OK to set these before starting the server? Or should I set them in /etc/rc? On Feb 10, 2004, at 10:04 AM, Tom Lane wrote: Also look at increasing the kernel's limit on number of open files (I remember seeing it i

Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-10 Thread Tom Lane
Brian Hirt <[EMAIL PROTECTED]> writes: > ... after i did ulimit -n > unlimited the problem joe describes went away for me. Hmm. Postgres assumes it can use the smaller of max_files_per_process and sysconf(_SC_OPEN_MAX). From what you describe, I suspect that OSX's sysconf call ignores the "ulim

Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-10 Thread Tom Lane
Joe Lester <[EMAIL PROTECTED]> 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

Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-10 Thread Brian Hirt
On Feb 10, 2004, at 10:57 AM, Tom Lane wrote: Hmm, I hadn't even thought about ulimit. I thought those settings were per-process, not per-user. If they are per-user they could be problematic. not sure if it's per user or per process. after i did ulimit -n unlimited the problem joe describes we

Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-10 Thread Brian Hirt
Joe, I've run into this on my ibook too. The default number of files is set very low by default. On my system 10.3.2, it's 256 for the postgres user. You can raise it to something higher like 2048 with the ulimit command. i have ulimit -n unlimited in my .bash_profile ibook:~ root# su -

Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-10 Thread Tom Lane
Brian Hirt <[EMAIL PROTECTED]> writes: > I've run into this on my ibook too. The default number of files is > set very low by default. On my system 10.3.2, it's 256 for the > postgres user. You can raise it to something higher like 2048 with > the ulimit command. i have ulimit -n unlimite

Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-09 Thread Tom Lane
Joe Lester <[EMAIL PROTECTED]> writes: > I tried a few different things to try to get the shmmax value to be > something other than 4194304 (the default in /etc/rc). > First, I restarted my mac, then, as the root user... You can't change shmmax on-the-fly in OS X --- that's why it's set up in /e

Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-09 Thread Joe Lester
Joe Lester <[EMAIL PROTECTED]> writes: That's odd. It's giving me a -1 for the shmmax value. I assume that's NOT normal. Why would that be? It's not --- you should get back the same value you set. I speculate that you tried to set a value that exceeded some internal sanity check in the kernel.

Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-09 Thread Joe Lester
Joe Lester <[EMAIL PROTECTED]> writes: I installed Postgres 7.4.1 on a dual processor G5 running Mac OS 10.3.2. I'm trying to increase the max_connections to 300 and running into some trouble. Hmm, it WorksForMe (TM). You did reboot after changing /etc/rc, no? Yes, I did a "Restart". Try "sysctl

Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-09 Thread Tom Lane
Joe Lester <[EMAIL PROTECTED]> writes: > That's odd. It's giving me a -1 for the shmmax value. I assume that's > NOT normal. Why would that be? It's not --- you should get back the same value you set. I speculate that you tried to set a value that exceeded some internal sanity check in the kerne

Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-09 Thread Tom Lane
Joe Lester <[EMAIL PROTECTED]> writes: > I installed Postgres 7.4.1 on a dual processor G5 running Mac OS > 10.3.2. I'm trying to increase the max_connections to 300 and running > into some trouble. Hmm, it WorksForMe (TM). You did reboot after changing /etc/rc, no? Try "sysctl -a | grep sysv"

Re: [GENERAL] Increasing Max Connections Mac OS 10.3

2004-02-09 Thread Ed L.
On Monday February 9 2004 9:22, Joe Lester wrote: > > I've tried increasing the shmmax in /etc/rc to a really high number, > but I'm still getting errors when I try to start postgres with pg_ctl: > > 2004-02-09 11:07:24 FATAL: could not create shared memory segment: > Invalid argument > sysctl -w