[Pkg-postgresql-public] Bug#739276: postgresql: Put pgstat in /var/run

Christian Tacke Christian.Tacke+debian.org at mad-protection.de
Mon Feb 17 12:14:30 UTC 2014


Package: postgresql-common
Version: 153
Severity: wishlist
Tags: patch


Hi,

PGDATA/pg_stat_tmp/* is written to a lot, even on a
completely idle system. This is not good if running on an
SSD or alike. That's for my motivation.

This directory is only needed at runtime, so putting it in
/var/run seems more appropiate also. The manual even
recommends using a RAM based filesystem for this directory.

The attached patch sets stats_temp_directory on newly
created clusters to '/var/run/postgresql/%v-%c_stat_tmp'.
This directory is created by pg_ctlcluster (see version
146). So this will not affect any existing installations
and possibly break them, if the admin did something
special.

I think, this is a reasonable default on most
installations. Everybody running a big or complex enough
database server really should take care about these details
anyway and can change them after creating the cluster.

This postgresql.conf option is supported since PG 8.4 [1],
so this will still allow backporting postgresql-common even
to squeeze.

Thanks in advance for considering.

Cheers

Christian Tacke


[1] http://www.postgresql.org/docs/8.4/static/runtime-config-statistics.html

-- 
www.mad-protection.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pg-common-move-stat_tmp.diff
Type: text/x-diff
Size: 1420 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-postgresql-public/attachments/20140217/9ee03244/attachment.diff>


More information about the Pkg-postgresql-public mailing list