I just upgraded Postgres from 7.4 to 8.0 via the ports. After suitably
editing the new config files, initializing the database (using my standard
procedure), starting postgres fails since the user "pgsql" doesn't exist.
The current setup requires that the postgres super user be "pgsql". Up thru
the port for 7.4.7, it allowed the postgres super user to be set from the
environment in ~pgsql/.profile for PGUSER. Traditionally, many people
(including myself) have used "postgres" as the database superuser. Much of
my infrastructure assumes superuser='postgres' so this is a hard change to
force into the port.
Fix: Use "su -l" like the 7.4.x init script does.
install the port for postgres 8.
export PGUSER=postgres in ~pgsql/.profile
init the database with:
su - pgsql -c 'initdb -U postgres'
then start /usr/local/etc/rc.d/010.pgsql.sh start
it will fail to start. doing the same process for 7.4 postgres port works
Over to maintainer