[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: links to logs in /etc? (/etc/postgresql/7.4/main/log)

Hi again,

Martin Pitt [2005-06-14 23:53 +0200]:
> The basic idea of the new cluster system was to have the complete
> information about a cluster's files in
> /etc/postgresql/<version>/<cluster>. That includes the location of the
> log files and the data directory, which are configured using these
> symlinks to their actual position.
> This makes it possible to move around clusters, rename them, or even
> have several postmasters log to the same file without assuming any
> preferred log file name in the infrastructure. 

As a concrete example: When transitioning the Sarge PostgreSQL package
to the new architecture, the cluster is originally at
/var/lib/postgres/data. If that directory is on the same partition as
/var/lib/postgresql/7.4/main (the new canonical location for the
main cluster), it is moved there. However, some people actually
mounted a separate database partition to /var/lib/postgres, or even
configured their cluster to use a completely different data
directory. The transition can't just copy the files to
/var/lib/postgresql then since there might be far too little space and
the admin specifically *wanted* to use a dedicated partition.

Thus the configuration of the data directory, log files, etc. must be
configurable somewhere. This can't happen in postgresql.conf, so
either there is another configuration file for the paths, or the paths
are configured using the symlinks. The latter method is much faster
and also more elegant IMHO.


Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org

Attachment: signature.asc
Description: Digital signature

Reply to: