On 4/29/2016 8:30 PM, Charles Clavadetscher wrote:
I had a discussion yesterday with some friends, who are sysadmins about the location of database files. In a default installation
from a distribution (apt-get install) PostgreSQL creates a cluster unter /var/lib/. According to my colleagues /var/lib should not
contain data that is supposed to last over time. I am aware that the location can be modified to suit the needs of sysadmins as
described under these links.
some random thoughts on this...
apt-get is a debian/ubuntu thing. the rhel/centos/fedora builds also put postgres in /var/lib, although the details differ.
a default built-from-source postgres puts everything in /usr/local
on centos, I generally mount a dedicated file system as /var/lib/pgsql/x.y/data, or even as /var/lib/pgsql ... or if the data file storage is already mounted somewhere arbitrary like /u01, then I'll symlink /var/lib/pgsql/9.4 to /u01/pgsql/9.4 or whatever.
--
john r pierce, recycling bits in santa cruz