
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
 
I am trying to get version 7.4.2 installed on a Solaris box, but
initdb fails because of shmmax being set too low. It does this
even though initdb drops shared buffers as low as it can go (50).
Is there any other way of getting around this limitation? I know
that 50 is pretty low, but the recommended way (changing shmmax)
involves rebooting a production machine and, while possible, is
not preferred. (This is for a very small database, and having a
very low shared buffers is acceptable.)
 
- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200404041539
 
-----BEGIN PGP SIGNATURE-----
 
iD8DBQFAcGUZvJuQZxSWSsgRAlNbAKCPBix3GX3M5LoOaF+uGSeNtaEKLgCfR5vV
zbN3wrnnbAAk3lkG2XH69fM=
=6lom
-----END PGP SIGNATURE-----



Sun,  4 Apr 2004 19:41:38 -0000
"Greg Sabino Mullane" <greg@turnstep.com>
Solaris initdb fails: shmmax tweak alternative?

On Apr 4, 2004, at 3:41 PM, Greg Sabino Mullane wrote:


> I am trying to get version 7.4.2 installed on a Solaris box, but
> initdb fails because of shmmax being set too low. It does this
> even though initdb drops shared buffers as low as it can go (50).
> Is there any other way of getting around this limitation? I know

You can also check out max_connections. Each one of those gobbles up 
shared memory.

Unfortunately, there isn't anything else you can really do beyond 
taking down shared_buffers and max_connections.  Its annoying, but if 
it makes you feel better, Informix or Oracle would have the same 
problem.

--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/


Sun, 4 Apr 2004 20:40:25 -0400
Jeff Trout <jeff@jefftrout.com>
Re: Solaris initdb fails: shmmax tweak alternative?
"Greg Sabino Mullane" <greg@turnstep.com> writes:
> I am trying to get version 7.4.2 installed on a Solaris box, but
> initdb fails because of shmmax being set too low. It does this
> even though initdb drops shared buffers as low as it can go (50).
> Is there any other way of getting around this limitation?

IIRC you can put it as low as 16 without having to resort to changing
the backend C code (you'll need to drop max_connections to 8 at the
same time).  50 is just the lowest value initdb troubles to probe,
but you could hack the initdb script easily to try smaller values.

Whether you'll get decent performance or stability at such a tiny
setting is another question.

> I know that 50 is pretty low, but the recommended way (changing
> shmmax) involves rebooting a production machine and, while possible,
> is not preferred.

[ raises eyebrow... ] So you're installing a test database server on a
production machine?  That's not preferred admin practice anywhere that
I know of.  If it's really going to be a production server, I won't have
a lot of sympathy for the performance problems that you'll doubtless
have, small database or no.

			regards, tom lane

Sun, 04 Apr 2004 22:44:55 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Solaris initdb fails: shmmax tweak alternative? 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
 
> [ raises eyebrow... ] So you're installing a test database server on a
> production machine?  That's not preferred admin practice anywhere that
> I know of.  If it's really going to be a production server, I won't have
> a lot of sympathy for the performance problems that you'll doubtless
> have, small database or no.
 
Not my choice, just be glad I've managed to get Postgres involved at all. :)
The development is already finished, but the development box and the
production box are not the same OS. Not ideal conditions, but very much out
of my control.
 
Having to recompile initdb.c is probably not an option. I'll probably push
to get shmmax bumped up. Contrary to the other writer's assertion however,
Sybase and Oracle both installed properly without having to change shmmax.
If anyone familiar with these can assert that a low shmmax also affects
their performance, that would be helpful in my argument to bump it up for
the PG install.
 
- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200404050713
 
-----BEGIN PGP SIGNATURE-----
 
iD8DBQFAcUE6vJuQZxSWSsgRAr80AKC/SVVm4unhMOh+Z0+rhDqn8zGSigCg5hve
iKhSKUt6N7qNhuq9WRO/EH4=
=OuWo
-----END PGP SIGNATURE-----



Mon,  5 Apr 2004 11:20:53 -0000
"Greg Sabino Mullane" <greg@turnstep.com>
Re: Solaris initdb fails: shmmax tweak alternative? 
Greg Sabino Mullane said:
>
>
> Having to recompile initdb.c is probably not an option.

Which version of PostreSQL are you installing on this production machine?
initdb is not a C program in any released version - in 7.4.2 it is a shell
script which you could trivially modify. Of course, in the next release it
will be a C program.

cheers

andrew



Mon, 5 Apr 2004 08:53:46 -0400 (EDT)
"Andrew Dunstan" <andrew@dunslane.net>
Re: Solaris initdb fails: shmmax tweak alternative?
"Greg Sabino Mullane" <greg@turnstep.com> writes:
> Having to recompile initdb.c is probably not an option.

initdb is just a shell script in existing releases.

> Sybase and Oracle both installed properly without having to change shmmax.

My bet is that they ate all available shmem, leaving none for Postgres...
have you checked ipcs(1) to see what's already allocated?

			regards, tom lane

Mon, 05 Apr 2004 10:59:38 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Solaris initdb fails: shmmax tweak alternative? 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
 
>> Having to recompile initdb.c is probably not an option.
>
>initdb is just a shell script in existing releases.
 
Yes, you are right. By sheer habit I typed in cd ~/pgsql/src/bin.
 
> My bet is that they ate all available shmem, leaving none for
> Postgres... have you checked ipcs(1) to see what's already allocated?
 
I did that and found out that Oracle is actually installed on a different
box! *sheepish grin* The good news of all this is that Oracle would
probably have had the same problems (but been much more cryptic about
what exactly the problem was). Thanks for the replies: I am going to push
for a shmmax boost and go from there. Less pain in the long run.
 
- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200404052013
 
-----BEGIN PGP SIGNATURE-----
 
iD8DBQFAcfbavJuQZxSWSsgRAr1SAJ0QZ9/Ur2NGmLnHJLzEqZ/grjq0kwCg3XpD
hg4M9gvuq5XmwnCxPaWojJg=
=vCPa
-----END PGP SIGNATURE-----



Tue,  6 Apr 2004 00:15:27 -0000
"Greg Sabino Mullane" <greg@turnstep.com>
Re: Solaris initdb fails: shmmax tweak alternative? 
Anyone see a benefit of adding command line flags to initdb to force
lower shared memory use without require a recompile?

Robert Treat

On Mon, 2004-04-05 at 08:53, Andrew Dunstan wrote:
> Greg Sabino Mullane said:
> >
> >
> > Having to recompile initdb.c is probably not an option.
> 
> Which version of PostreSQL are you installing on this production machine?
> initdb is not a C program in any released version - in 7.4.2 it is a shell
> script which you could trivially modify. Of course, in the next release it
> will be a C program.
> 
> cheers
> 
> andrew
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

-- 
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


06 Apr 2004 09:59:09 -0400
Robert Treat <xzilla@users.sourceforge.net>
Re: Solaris initdb fails: shmmax tweak alternative?
Robert Treat <xzilla@users.sourceforge.net> writes:
> Anyone see a benefit of adding command line flags to initdb to force
> lower shared memory use without require a recompile?

Lower than what?  The bottom values it checks are already ridiculously
small.  If you can't get it to initdb you really need to fix your kernel
settings ...

			regards, tom lane

Tue, 06 Apr 2004 10:55:35 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Solaris initdb fails: shmmax tweak alternative? 
On Sun, Apr 04, 2004 at 07:41:38PM -0000, Greg Sabino Mullane wrote:
> I am trying to get version 7.4.2 installed on a Solaris box, but
> initdb fails because of shmmax being set too low. It does this

You'll have to fix shmmax.  I've never been able to get postgres
started (since 7.0) on Solaris with the Solaris defaults.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca

Mon, 12 Apr 2004 13:14:53 -0400
Andrew Sullivan <ajs@crankycanuck.ca>
Re: Solaris initdb fails: shmmax tweak alternative?