Re: Why are data files stored in /var/lib

From: "Charles Clavadetscher" <clavadetscher(at)swisspug(dot)org>
To: 'Manuel Gómez' <targen(at)gmail(dot)com>
Cc: "'Postgres General'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why are data files stored in /var/lib
Date: 2016-04-30 04:13:18
Message-ID: 015101d1a296$a674ed90$f35ec8b0$@swisspug.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Manuel

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message wolfgang 2016-04-30 06:08:36 Skip trigger?
Previous Message Andrew Sullivan 2016-04-30 03:57:40 Re: How to manually force a transaction wraparound