ports/156662: postgresql90-server port install fails due to misuse of PGUSER environment variable
mark at summersault.com
Tue Apr 26 16:00:26 UTC 2011
>Synopsis: postgresql90-server port install fails due to misuse of PGUSER environment variable
>Arrival-Date: Tue Apr 26 16:00:21 UTC 2011
>Originator: Mark Stosberg
>Release: FreeBSD 8.1-RELEASE i386
System: FreeBSD sap.summersault.com 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Fri Feb 18 04:03:40 EST 2011 root@:/usr/obj/usr/src/sys/SAP i386
I have done multiple point upgrades of the PostgreSQL 9.0.x port series, but the latest one failed inbetween "make deinstall" and "make reinstall", creating some downtime. Fortunately, it was a dev machine.
The issue is that the "PGUSER" environment variable (and perhaps others) are being mis-used.
Variables like this are documented by PostgreSQL to be "default connection parameters". However, the
installation process assumes that if they are defined, they are the values used for the "pgsql super-user".
For anyone who has these set for a different default connection, the installation will fail with a cryptic error, shown
You can see the issue in this "screenshot". Notice the last line, which refers to attempting to add a "dev_limited" user, which should not be involved in the process at all.
root at dev# make reinstall
===> Installing for postgresql-server-9.0.4_1
===> postgresql-server-9.0.4_1 depends on shared library: pq.5 - found
===> Generating temporary packing list
===> Checking if databases/postgresql90-server already installed
=========== BACKUP YOUR DATA! =============
As always, backup your data before
upgrading. If the upgrade leads to a higher
minor revision (e.g. 7.3.x -> 7.4), a dump
and restore of all databases is
required. This is *NOT* done by the port!
Press ctrl-C *now* if you need to pg_dump.
You already have a group "pgsql", so I will use it.
pw: uid `70' has already been allocated
Adding user "dev_limited" failed...
The recommended solution is to use a new, specific environment variable for defining a custom "psql super-user" value for those who wish to set one.
More information about the freebsd-ports-bugs