Re: Why are data files stored in /var/lib - Mailing list pgsql-general

From Manuel Gómez
Subject Re: Why are data files stored in /var/lib
Date
Msg-id CAJWnFaO=sbA_vOU0ZDLFbWeWGkfcuadc7y2Mv9cRg9kJzGmzrg@mail.gmail.com
Whole thread Raw
In response to Why are data files stored in /var/lib  ("Charles Clavadetscher" <clavadetscher@swisspug.org>)
Responses Re: Why are data files stored in /var/lib
Re: Why are data files stored in /var/lib
List pgsql-general
On Fri, Apr 29, 2016 at 11:00 PM, Charles Clavadetscher
<clavadetscher@swisspug.org> 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/libshould not 
> contain data that is supposed to last over time.

Your sysadmin friends should read the excellent
http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLIBVARIABLESTATEINFORMATION

Filesystem Hierarchy Standard

Chapter 5. The /var Hierarchy

Purpose

/var contains variable data files. This includes spool directories and
files, administrative and logging data, and transient and temporary
files.

Some portions of /var are not shareable between different systems. For
instance, /var/log, /var/lock, and /var/run. Other portions may be
shared, notably /var/mail, /var/cache/man, /var/cache/fonts, and
/var/spool/news.

/var is specified here in order to make it possible to mount /usr
read-only. Everything that once went into /usr that is written to
during system operation (as opposed to installation and software
maintenance) must be in /var.

[…]

/var/lib : Variable state information

Purpose

This hierarchy holds state information pertaining to an application or
the system. State information is data that programs modify while they
run, and that pertains to one specific host. Users must never need to
modify files in /var/lib to configure a package's operation.

State information is generally used to preserve the condition of an
application (or a group of inter-related applications) between
invocations and between different instances of the same application.
State information should generally remain valid after a reboot, should
not be logging output, and should not be spooled data.


pgsql-general by date:

Previous
From: "Charles Clavadetscher"
Date:
Subject: Why are data files stored in /var/lib
Next
From: Andrew Sullivan
Date:
Subject: Re: How to manually force a transaction wraparound