Re: postgres user account on OSX

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Darren Weber" <darren(dot)weber(dot)lists(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres user account on OSX
Date: 2008-09-10 23:44:41
Message-ID: 3778.1221090281@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Darren Weber" <darren(dot)weber(dot)lists(at)gmail(dot)com> writes:
> There is a postgres user account on my OSX system. I'm not clear
> about how it was created. I've installed a binary version of 8.3 in
> /Library/PostgreSQL/8.3/ and built another version from source into
> /usr/local/pgsql/. When I login as root and then 'su - postgres' it
> takes me to the postgres account and the user directory is at
> /opt/local/var/db/postgresql83/.

> Can someone explain how this user account was created?

I'm guessing that binary package created it for you --- check its docs,
or look at the install script if you can.

Apple includes a version of postgres in Remote Desktop, but last
I heard it was a lot older than 8.3 (7.3.x in fact :-(), and in any case
that's not where they put the database. So I don't think that's what's
causing this.

> I'm trying to start the server that I built from source but it will
> not create a logfile, ie:

Well, that's cause you're trying to create the logfile in a root-owned
directory that you don't have write permission on. Put the logfile
someplace you do have privileges for. Or change the ownership of the
directory --- it definitely seems pretty weird/broken to give an account
a home directory it doesn't own.

> Should I remove this user somehow and replace it with a standard user
> (using the system admin GUI)?

You could do that too if you liked. Postgres isn't picky about
what account it runs under, so long as it isn't root. You just need to
be sure the ownership of the database files/directories matches.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2008-09-10 23:48:19 Re: abusing plpgsql array variables
Previous Message kevin kempter 2008-09-10 23:19:56 Re: postgres user account on OSX