Re: pgsql user change to postgres - Mailing list pgsql-general

From Tom Lane
Subject Re: pgsql user change to postgres
Date
Msg-id 2779.1151851244@sss.pgh.pa.us
Whole thread Raw
In response to pgsql user change to postgres  (Joe <dev@freedomcircle.net>)
Responses Re: pgsql user change to postgres
List pgsql-general
Joe <dev@freedomcircle.net> writes:
> I'm now migrating to FreeBSD and was surprised to find that the port
> used 'pgsql' as the user.  The maintainer said that was done to ensure
> backward compatibility because that *was* the original name.

It's always been "postgres", at least as far as the standard name of the
initial database superuser goes.  I see no recommendation of "pgsql" in
Postgres 4.2 for instance:

$ gzcat postgres-v4r2.tar.gz | grep -i pgsql | wc
0 0 0
$

Various ports have used "pgsql" in their preferred installation paths,
eg the Linux RPMs use /var/lib/pgsql/data as the preferred $PGDATA,
but this should generally be transparent to users of the database.
Changing the superuser name isn't transparent, though.

FreeBSD is out in left field here.  However, I don't see why you need to
alter the build to change this.  Just create a new user postgres and run
the initdb step as that user.  initdb uses the OS user name it's run as
to determine the initial superuser name.

            regards, tom lane

pgsql-general by date:

Previous
From: "chris smith"
Date:
Subject: Re: pgsql user change to postgres
Next
From: "Dave Page"
Date:
Subject: Re: Notes on converting from MySQL 5.0.x to PostgreSQL