mirror of https://github.com/zulip/zulip.git
puppet: Use PostgreSQL's internal logging system
This also requires disabling logrotate for postgres log files. (imported from commit eeedb87a4f488829c59eddecc041654e762d6d0e)
This commit is contained in:
parent
f7237ac2aa
commit
a40b5da432
|
@ -374,7 +374,7 @@ ssl = true # (change requires restart)
|
|||
#log_duration = off
|
||||
#log_error_verbosity = default # terse, default, or verbose messages
|
||||
#log_hostname = off
|
||||
log_line_prefix = '%t ' # special values:
|
||||
#log_line_prefix = '%t ' # special values:
|
||||
# %a = application name
|
||||
# %u = user name
|
||||
# %d = database name
|
||||
|
@ -567,3 +567,13 @@ timezone = 'UTC'
|
|||
# EBS supposedly has very similar sequential and random access performance
|
||||
random_page_cost = 1.1
|
||||
listen_addresses = '*'
|
||||
|
||||
log_destination = 'stderr'
|
||||
logging_collector = on
|
||||
log_directory = '/var/log/postgresql'
|
||||
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
|
||||
log_rotation_age = 7d
|
||||
log_rotation_size = 100MB
|
||||
log_min_duration_statement = 500
|
||||
log_line_prefix = '%m %c/%p '
|
||||
log_lock_waits = on
|
||||
|
|
|
@ -357,6 +357,10 @@ class humbug_postgres {
|
|||
Common::Append_if_no_such_line['shmall'],
|
||||
],
|
||||
}
|
||||
|
||||
exec { "disable_logrotate":
|
||||
command => "dpkg-divert --rename --divert /etc/logrotate.d/postgresql-common.disabled --add /etc/logrotate.d/postgresql-common"
|
||||
}
|
||||
}
|
||||
|
||||
class { "humbug_base": }
|
||||
|
|
Loading…
Reference in New Issue