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

From Charles Clavadetscher
Subject Re: Why are data files stored in /var/lib
Date
Msg-id 015101d1a296$a674ed90$f35ec8b0$@swisspug.org
Whole thread Raw
In response to Re: Why are data files stored in /var/lib  (Manuel Gómez <targen@gmail.com>)
List pgsql-general
Hello Manuel

> -----Original Message-----
> From: Manuel Gómez [mailto:targen@gmail.com]
> Sent: Samstag, 30. April 2016 05:45
> To: Charles Clavadetscher <clavadetscher@swisspug.org>
> Cc: Postgres General <pgsql-general@postgresql.org>
> Subject: Re: [GENERAL] Why are data files stored in /var/lib
>
> 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/lib should 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.

Thank you a lot. That (and the additional info in the link) explains it very well.
Bye
Charles




pgsql-general by date:

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