ports/78630: postgres-server 8.0.1 doesn't allow alternet PG superuser anymore

Vivek Khera vivek at khera.org
Wed Mar 9 16:20:03 UTC 2005


>Number:         78630
>Category:       ports
>Synopsis:       postgres-server 8.0.1 doesn't allow alternet PG superuser anymore
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 09 16:20:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Vivek Khera
>Release:        FreeBSD 5.3-STABLE amd64
>Organization:
>Environment:
System: FreeBSD yertle.int.kciLink.com 5.3-STABLE FreeBSD 5.3-STABLE #0: Fri Jan 7 16:42:37 EST 2005 khera at yertle.int.kciLink.com:/usr/obj/usr/src/sys/YERTLE amd64


	
>Description:
	

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.

>How-To-Repeat:
	

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.

>Fix:

	

Use "su -l" like the 7.4.x init script does.


--- /usr/local/etc/rc.d/#010.pgsql.sh~  Wed Mar  9 10:55:17 2005
+++ /usr/local/etc/rc.d/010.pgsql.sh    Wed Mar  9 10:55:17 2005
@@ -47,7 +47,7 @@
 
 postgresql_command()
 {
-    su -m ${postgresql_user} -c "exec ${command} ${command_args}"
+    su -l ${postgresql_user} -c "exec ${command} ${command_args}"
 }
     
 postgresql_initdb()
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list