mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
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:
@@ -374,7 +374,7 @@ ssl = true # (change requires restart)
|
|||||||
#log_duration = off
|
#log_duration = off
|
||||||
#log_error_verbosity = default # terse, default, or verbose messages
|
#log_error_verbosity = default # terse, default, or verbose messages
|
||||||
#log_hostname = off
|
#log_hostname = off
|
||||||
log_line_prefix = '%t ' # special values:
|
#log_line_prefix = '%t ' # special values:
|
||||||
# %a = application name
|
# %a = application name
|
||||||
# %u = user name
|
# %u = user name
|
||||||
# %d = database name
|
# %d = database name
|
||||||
@@ -567,3 +567,13 @@ timezone = 'UTC'
|
|||||||
# EBS supposedly has very similar sequential and random access performance
|
# EBS supposedly has very similar sequential and random access performance
|
||||||
random_page_cost = 1.1
|
random_page_cost = 1.1
|
||||||
listen_addresses = '*'
|
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'],
|
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": }
|
class { "humbug_base": }
|
||||||
|
|||||||
Reference in New Issue
Block a user