FreeBSD Bugzilla – Bug 156662
databases/postgresql90-server install fails due to misuse of PGUSER environment variable
Last modified: 2011-04-27 14:30:07 UTC
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
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.
How-To-Repeat: 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@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...
Fix synopsis and assign.
girgen 2011-04-27 13:28:51 UTC
FreeBSD ports repository
Fix problem creating postgres user when PGUSER was set.
Revision Changes Path
1.222 +6 -4 ports/databases/postgresql84-server/Makefile
1.1 +61 -0 ports/databases/postgresql84-server/files/pkg-install-server (new)
1.2 +0 -66 ports/databases/postgresql84-server/files/pkg-install-server.in (dead)
1.217 +6 -4 ports/databases/postgresql90-server/Makefile
1.1 +61 -0 ports/databases/postgresql90-server/files/pkg-install-server (new)
1.2 +0 -66 ports/databases/postgresql90-server/files/pkg-install-server.in (dead)
email@example.com mailing list
To unsubscribe, send any mail to "firstname.lastname@example.org"
Fix committed. Thanks for the heads up!