Bug 78630

Summary: databases/postgresql80-server doesn't allow alternet PG superuser anymore
Product: Ports & Packages Reporter: Vick Khera <vivek>
Component: Individual Port(s)Assignee: Palle Girgensohn <girgen>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
file.diff none

Description Vick Khera 2005-03-09 16:20:02 UTC

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
just fine.
Comment 1 Volker Stolz freebsd_committer 2005-03-10 08:37:02 UTC
Responsible Changed
From-To: freebsd-ports-bugs->girgen

Over to maintainer
Comment 2 Palle Girgensohn freebsd_committer 2005-03-19 03:57:55 UTC
State Changed
From-To: open->closed

Committed. Thanks!