Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 275341

Summary: dev-db/postgresql: suggestion: use /var/lib/postgresql instead of /var/lib
Product: Gentoo Linux Reporter: Marc Schiffbauer <mschiff>
Component: Current packagesAssignee: PgSQL Bugs <pgsql-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: titanofold
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Marc Schiffbauer gentoo-dev 2009-06-24 23:52:55 UTC
With the current ebuild a use "postgres" is being created with the home directory set to "/var/lib".

This leads to errors as such that if using psql as user postgres the history-file ~/.psql_history cannot be saved as /var/lib ist not writable for this user.

Setting /var/lib/postgresql as home directory instead would solve this problem.
The same problem exists for .bash_history for example.



Reproducible: Always

Steps to Reproduce:
1. su - postgres
2. psql, then \q


Actual Results:  
~/.psql_history cannot be saved

Expected Results:  
~/.psql_history would be save to postgres's home directory

I  think emerge --info is not needed here... not?
Comment 1 Wormo (RETIRED) gentoo-dev 2009-06-28 04:18:50 UTC
Thanks for your suggestion, assigning to postgresql maintainers
Comment 2 Aaron W. Swenson gentoo-dev 2010-07-21 15:38:54 UTC
This has been fixed in dev-db/postgresql-server for quite some time. From /etc/passwd:
    postgres:x:70:70:added by portage for postgresql-server:/var/lib/postgresql:/bin/bash