Commit 0af5855c authored by Martin Pitt's avatar Martin Pitt

pg_createcluster: Disable copy-on-write semantics for data dirrectory on

btrfs and similar file systems. It eats a lot of performance and isn't
necessary for data integrity.
parent f036f1d3
postgresql-common (163) UNRELEASED; urgency=medium
* pg_createcluster: Disable copy-on-write semantics for data dirrectory on
btrfs and similar file systems. It eats a lot of performance and isn't
necessary for data integrity.
-- Martin Pitt <mpitt@debian.org> Wed, 15 Oct 2014 15:15:23 +0200
postgresql-common (162) unstable; urgency=medium
[ Christoph Berg ]
......
......@@ -55,6 +55,10 @@ sub init_db {
error 'could not create data directory; you might need to run this program with root privileges';
}
# disable copy-on-write semantics for PostgreSQL data on btrfs and similar;
# this fails on file systems which don't support it, so ignore errors
system "chattr -V +C '$datadir' 2>/dev/null";
my @initdb = (get_program_path 'initdb', $version);
die 'Internal error: could not determine initdb path' unless $initdb[0];
if (my $options = $defaultconf{'initdb_options'}) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment