mirror of https://github.com/zulip/zulip.git
puppet: Ensure a particular 30-postgresql-shm.conf file instead of appending lines to its contents
(imported from commit 884e1f2663763d7286146583a097f4548253e347)
This commit is contained in:
parent
fb5e5519d9
commit
c76ae76d51
|
@ -0,0 +1,13 @@
|
|||
# Shared memory settings for PostgreSQL
|
||||
|
||||
# Note that if another program uses shared memory as well, you will have to
|
||||
# coordinate the size settings between the two.
|
||||
|
||||
# Maximum size of shared memory segment in bytes
|
||||
#kernel.shmmax = 33554432
|
||||
|
||||
# Maximum total size of shared memory in pages (normally 4096 bytes)
|
||||
#kernel.shmall = 2097152
|
||||
|
||||
kernel.shmall = 1703936
|
||||
kernel.shmmax = 6979321856
|
|
@ -6,9 +6,10 @@ class humbug::postgres {
|
|||
|
||||
file { '/etc/sysctl.d/30-postgresql-shm.conf':
|
||||
ensure => file,
|
||||
owner => root,
|
||||
group => root,
|
||||
mode => 644
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 644,
|
||||
source => 'puppet:///modules/humbug/postgresql/30-postgresql-shm.conf',
|
||||
}
|
||||
|
||||
file { "/etc/postgresql/9.1/main/postgresql.conf":
|
||||
|
@ -29,25 +30,10 @@ class humbug::postgres {
|
|||
source => "puppet:///modules/humbug/postgresql/pg_hba.conf",
|
||||
}
|
||||
|
||||
common::line { 'shmmax':
|
||||
require => [ Package['postgresql-9.1'],
|
||||
File["/etc/sysctl.d/30-postgresql-shm.conf"] ],
|
||||
file => '/etc/sysctl.d/30-postgresql-shm.conf',
|
||||
line => 'kernel.shmmax = 6979321856',
|
||||
}
|
||||
|
||||
common::line { 'shmall':
|
||||
require => [ Package['postgresql-9.1'],
|
||||
File["/etc/sysctl.d/30-postgresql-shm.conf"] ],
|
||||
file => '/etc/sysctl.d/30-postgresql-shm.conf',
|
||||
line => 'kernel.shmall = 1703936',
|
||||
}
|
||||
|
||||
exec { "sysctl_p":
|
||||
command => "/sbin/sysctl -p /etc/sysctl.d/30-postgresql-shm.conf",
|
||||
require => [ Common::Line['shmmax'],
|
||||
Common::Line['shmall'],
|
||||
],
|
||||
command => "/sbin/sysctl -p /etc/sysctl.d/30-postgresql-shm.conf",
|
||||
subscribe => File['/etc/sysctl.d/30-postgresql-shm.conf'],
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
exec { "disable_logrotate":
|
||||
|
|
Loading…
Reference in New Issue