Apply sysctls before restarting postgres.

(imported from commit bc1f1ce1b880962640b8ed5f516139eaf91cb1db)
This commit is contained in:
Tim Abbott
2013-11-12 22:01:36 -05:00
parent b4403fda43
commit 155d50f0cb

View File

@@ -59,6 +59,12 @@ vm.dirty_background_ratio = 5
"
}
exec { "sysctl_p":
command => "/sbin/sysctl -p /etc/sysctl.d/40-postgresql.conf",
subscribe => File['/etc/sysctl.d/40-postgresql.conf'],
refreshonly => true,
}
exec { 'pgtune':
require => Package[pgtune],
# Let Postgres use half the memory on the machine
@@ -68,6 +74,7 @@ vm.dirty_background_ratio = 5
}
exec { 'pg_ctlcluster 9.1 main restart':
require => Exec["sysctl_p"],
refreshonly => true,
subscribe => [ Exec['pgtune'], File['/etc/sysctl.d/40-postgresql.conf'] ]
}