Thread: setting up the user postgres on mac osx

setting up the user postgres on mac osx

From
Byron Amerson
Date:
I have several mac osx specific questions related to postgresql.
background info: an apparently successful build of postgres 7.4beta5 on an
imac with osx 10.3.  readline by fink in the standard fink directory /sw

1. What is the best way to set up a new user for use by PostgreSQL?  Via
accounts on the preferences panel, netinfo, or at the command line with
niutil?  So far I am having marginal luck with netinfo. Basically, where
should this user postgres's home directory be?  I assume I should put a start
up script for tcsh here?  Should the user postgres have write
permission tothis home directory?  Additionally it seems silly to have the
user postgres having the option to log on at start up similar to a regular
user in addition to all of teh default directories like documemnts, music etc
(as when a new user is created in the accounts panel of preferences).

2.  When I was attempting to set up my postgres build on 10.2 I had some
difficulty with the logfile.  Where is this logfile writtem to?  It seemed
that the script couldn't write the logfile due to some permissions issue -
is this a corect assumtion? That is, does the user postgres need to
have permission to write to the directory where the logfile normally is
placed (sorry so vague here, I've yet to try it out just yet on my new
build)

3. Should the user postgres also be in its own group?

Thanks in advance for any advice/help on these questions.

Byron Amerson
MS student
University of Washington
Department of Earth and Space Sciences

Re: setting up the user postgres on mac osx

From
Jeffrey Melloy
Date:
Byron Amerson wrote:

>I have several mac osx specific questions related to postgresql.
>background info: an apparently successful build of postgres 7.4beta5 on an
>imac with osx 10.3.  readline by fink in the standard fink directory /sw
>
>1. What is the best way to set up a new user for use by PostgreSQL?  Via
>accounts on the preferences panel, netinfo, or at the command line with
>niutil?  So far I am having marginal luck with netinfo. Basically, where
>should this user postgres's home directory be?  I assume I should put a start
>up script for tcsh here?  Should the user postgres have write
>permission tothis home directory?  Additionally it seems silly to have the
>user postgres having the option to log on at start up similar to a regular
>user in addition to all of teh default directories like documemnts, music etc
>(as when a new user is created in the accounts panel of preferences).
>
>
>
I recommend using netinfo.  The postgres user doesn't really need a home
directory (I might've used /usr/local/pgsql/) and if you have a UID/GID
of less than 500, they don't show up in the login window.  postgres
does, however, need to have a shell set, or you can't su to it.

>2.  When I was attempting to set up my postgres build on 10.2 I had some
>difficulty with the logfile.  Where is this logfile writtem to?  It seemed
>that the script couldn't write the logfile due to some permissions issue -
>is this a corect assumtion? That is, does the user postgres need to
>have permission to write to the directory where the logfile normally is
>placed (sorry so vague here, I've yet to try it out just yet on my new
>build)
>
>
>
The postgres user needs to be able to write to the directory, yes.  Make
sure you are setting the logfile to the /usr/local/pgsql/ directory (or
wherever) by specifying either an absolute path or starting from that
directory.

>3. Should the user postgres also be in its own group?
>
>
>
Yes.

I've written a short installation procedure for installing on Panther at
http://www.visualdistortion.org/adium/quick_install.html (you can ignore
the bit about Adium, of course)

>Thanks in advance for any advice/help on these questions.
>
>Byron Amerson
>MS student
>University of Washington
>Department of Earth and Space Sciences
>
>---------------------------(end of broadcast)---------------------------
>TIP 9: the planner will ignore your desire to choose an index scan if your
>      joining column's datatypes do not match
>
>