Date: Wed, 9 Mar 2005 11:12:00 -0500 (EST) From: Vivek Khera <vivek@khera.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/78630: postgres-server 8.0.1 doesn't allow alternet PG superuser anymore Message-ID: <20050309161200.4D970B856@yertle.kcilink.com> Resent-Message-ID: <200503091620.j29GK2V2049849@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050309161200.4D970B856>