X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A0DCED930B for ; Wed, 28 Sep 2005 22:59:48 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 21835-03 for ; Thu, 29 Sep 2005 01:59:42 +0000 (GMT) Received: from smtp-send.myrealbox.com (smtp-send.myrealbox.com [192.108.102.143]) by svr1.postgresql.org (Postfix) with ESMTP id 74BFAD9B6E for ; Wed, 28 Sep 2005 22:59:43 -0300 (ADT) Received: from [172.16.1.188] grzm [61.197.227.146] by smtp-send.myrealbox.com with NetMail SMTP Agent $Revision: 1.6 $ on Linux via secured & encrypted transport (TLS); Wed, 28 Sep 2005 19:59:41 -0600 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-docs@postgresql.org Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: INSTALL file nits Date: Thu, 29 Sep 2005 10:59:38 +0900 To: Rich Morin X-Mailer: Apple Mail (2.734) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.022 required=5 tests=[AWL=0.022] X-Spam-Level: X-Archive-Number: 200509/46 X-Sequence-Number: 3232 Hello! Not clear if you're new to PostgreSQL or not, but regardless, a warm welcome is extended. On Sep 29, 2005, at 10:29 , Rich Morin wrote: > I just grabbed a copy of PostgreSQL from > > http://www.apple.com/downloads/macosx/unix_open_source/ > postgresql.html Nifty! I didn't know Apple had a link there. And it's even a recent version! > and installed it on my Mac OS X (Tiger; 10.4.2) machine. I > followed the > "Short Version" in the INSTALL file until I ran into problems, then > did > some workarounds, as discussed below. The short version is definitely that: short. It ceases to be short when one adds all of the caveats for all of the various systems and environments in which PostgreSQL will run. > Perhaps this file should be made > a bit more explicit or an INSTALL.OSX file could be generated... One of the joys of open source is that the community can contribute, be that source code or documentation. (hint hint) > adduser postgres > No such command. I considered using System Preferences > Accounts > to add a user, but this seemed like a rather bogus approach, as it > would put a user in the Login dialog (unlike lp, postfix, ...). I > found a (slightly dated) note from Apple, however, that suggested > just this approach, so I gave it a try. To get around this, you can create a user using NetInfo (or nicl or niutil at the command line) by copying another user, such as www. Make sure the userid is low (less than 100, iirc) and they will not appear in the login window, nor will a home folder be created. I use this technique for setting up a svn user on my machine (though I haven't done it yet for a postgres user). Depending on your needs, you may want to bump up the shmmall and shmmax values in /etc/rc. They're quite small on a default Mac OS X install. I've needed to increase them if I'm running more than one installation of PostgreSQL on my box, or if I'm increasing the number of allowed connections to the server. With 2GB of available RAM, I allocated 256MB rather than the default 4MB. (I include the notes in the /etc/rc file so I remember what it was I did.) Here are my settings # original supplied with Mac OS X 10.4 # sysctl -w kern.sysv.shmmax=4194304 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=1024 # Defaults are for 4MB # shmmax (4MB * 1024KB/MB * 1024 bytes/KB = 4194304 bytes) # shmall (4MB @ 4K/page => 1024 pages) # Increase to 256MB # shmmax (256MB * 1024KB/MB * 1024 bytes/KB = 268435456) # shmall (256MB @ 4K/page => 65536 pages) sysctl -w kern.sysv.shmmax=268435456 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=65536 Don't know if this will be necessary for you, but thought you might like to know. Michael Glaesemann grzm myrealbox com