Bug 177085 - dev-db/postgresql - postgresql homedir and $PGDATA env issues
Bug#: 177085 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: pgsql-bugs@gentoo.org Reported By: david@fetter.org
Component: Ebuilds
URL: 
Summary: dev-db/postgresql - postgresql homedir and $PGDATA env issues
Keywords:  
Status Whiteboard: 
Opened: 2007-05-04 20:04 0000
Description:   Opened: 2007-05-04 20:04 0000
A few things aren't quite right in PostgreSQL setup:

* initdb defaults to using SQL_ASCII encoding.  This is almost never right, and
UTF8 is a safe default.

* The postgres users's home directory is /var/lib and not /var/lib/postgresql

* The postgres user's environment does not contain $PGDATA

------- Comment #1 From Jakub Moc (RETIRED) 2007-05-04 20:08:44 0000 -------
Move your ASCII vs. unicode vs. whatever issues to Bug 49864 please...

------- Comment #2 From Priit Laes (IRC: plaes) 2007-06-27 14:14:36 0000 -------
When postgres homedir is /var/lib, then it isn't writable for postgres user.

------- Comment #3 From Tiziano Müller 2008-06-14 11:52:55 0000 -------
The $PGDATA issue is in bug #110912 (not sure what to do about it).
The postgres user's home dir is now /var/lib/postgresql and "emerge --config"
reads an env var to set the default encoding.