mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
Apply sysctls before restarting postgres.
(imported from commit bc1f1ce1b880962640b8ed5f516139eaf91cb1db)
This commit is contained in:
@@ -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'] ]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user