Solaris, Postgresql and Problems

Started by Errol Nealover 22 years ago2 messagesgeneral
Jump to latest
#1Errol Neal
errol.neal@enhtech.com

Hi All,

I have posted this before, but have not yet got any resolutions on it. I am
hoping someone with experience can help me out.
I am running Postgresql 7.3.2 on Solaris 5.9. I am trying to increase the
number of max connections for postgresql but it but
I am having some issue. After reading through some docs and getting some
tips from folks on the list, I modified the /etc/system
file on my host system and entered the following data:

set shmsys:shminfo_shmmax=0x2000000
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=256
set shmsys:shminfo_shmseg=256

set semsys:seminfo_semmap=256
set semsys:seminfo_semmni=512
set semsys:seminfo_semmns=512
set semsys:seminfo_semmsl=32

After making this change, and increasing the max number of buffers to 128
and the max number of connections to 64, I rebooted my system. Things come
up fine, Postgres seems happy, but shortly after the Postgres server dies
or terminates with nothing in logs as to WHY it terminates and it keeps
doing so even after I revert back to my original config. The only things
that remedies the problem of the server dying without any apparent notice
is if I revert back to my original /etc/system file.. Does anybody have any
experience with these issues? All I am trying to do is get a few more
connections out of my system. I could sure use someone's help. Do I need to
re-compile postgresql?

TIA,

Errol Neal

Errol Neal, Systems/Network Administrator
eneal@enhtech.com
Enhanced Technologies Inc.
http://www.enhtech.com
703-924-0301 or 800-368-3249
703-924-0302 Fax

#2William Yu
wyu@talisys.com
In reply to: Errol Neal (#1)
Re: Solaris, Postgresql and Problems

| After making this change, and increasing the max number of buffers to
| 128 and the max number of connections to 64, I rebooted my system.
| Things come up fine, Postgres seems happy, but shortly after the
| Postgres server dies or terminates with nothing in logs as to WHY it
| terminates and it keeps doing so even after I revert back to

I've been running Postgres on Solaris x86 (5.8 & 5.9) for several years
now and there's a few system level problems with Solaris' shared memory.
The shmmax you can set to almost any number without issue. But the
others, Solaris will produce kernel panics if the numbers are set too high.

I'd recommend only changing shminfo_shmmax at the start. (And make it a
larger number while you're at it. 128 shared_buffers is a grand total of
1MB of memory; Postgres will run dog slow at that setting. My servers
use settings of 16,000 for 512MB machines to 250,000 for 8GB machines.)

64 connections should not be a problem with the default Solaris shared
memory settings (at least not as far as I can remember). If it does
complain, then change only the variable the Postgres logs mention.