Re: Christian Tacke 2014-03-08 <20140308115643.ga20...@ahorn.local.lan> > > /var/run/lock wouldn't work because it's too small (5120k here). > > stats_temp_directory files are often quite small. My small > cluster has a 58 kB pgstat.stat. So this could work.
It'll easily grow to a handfull of megabytes if you create more tables. Re: Martin Pitt 2014-03-08 <20140308165306.ga2...@piware.de> > > Note that pg_ctlcluster creates the stats_temp_directory > > and sets the owner of that directory to the cluster owner. > > So for clusters that root/postgres created but hands over > > to other people, this should actually work. (Not tested!) > > Yes, as long as the init scripts (which run as root) do that, the init > script could pre-create the stats dir (the patch doesn't currently do > that, though). It would still not work to run pg_ctlcluster start as > the cluster owner, though. We do create the stats dir, but obviously that won't work if pg_ctlcluster isn't running as root and the user can't write to the parent dir. > > /tmp is possibly still better than the data directory. > > Yes, indeed. Especially on machines with a reasonable amount of > memory it is advisable to put /tmp/ on a tmpfs, and I guess many > people do that (reduces battery usage, HD > wakeups/wearout/fragmentation, and on servers to increase > performance). I don't think we should put stuff into /tmp by default even if mkdir() is safe. > > # Clusters created by normal users will need to change this > > # option in postgresql.conf, because the directory will not > > # be setup properly for them. > > No, I don't believe in configuring broken defaults. Then let's rather > only configure this for owners which can actually write > /var/run/postgres/, so that the status quo is kept for clusters of > other owners. Right. I wouldn't want to put too much magic in createcluster.conf, but "don't set this var if the dir isn't writable" is a good plan. Christoph -- c...@df7cb.de | http://www.df7cb.de/
signature.asc
Description: Digital signature
_______________________________________________ Pkg-postgresql-public mailing list Pkg-postgresql-public@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-postgresql-public