Bug 1770646 - log_rotation_size must be set when enabling log_min_duration_statement for PostgreSQL
Summary: log_rotation_size must be set when enabling log_min_duration_statement for Po...
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installer
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: 6.7.0
Assignee: Ewoud Kohl van Wijngaarden
QA Contact: Devendra Singh
Depends On:
TreeView+ depends on / blocked
Reported: 2019-11-11 02:48 UTC by matt jia
Modified: 2020-04-14 13:26 UTC (History)
4 users (show)

Fixed In Version: foreman-installer-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-04-14 13:26:24 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 28497 Normal Closed set log_rotation_size when enabling log_min_duration_statement for PostgreSQL 2020-03-27 17:39:41 UTC
Red Hat Product Errata RHSA-2020:1454 None None None 2020-04-14 13:26:33 UTC

Description matt jia 2019-11-11 02:48:34 UTC
Description of problem:

BZ#1749233 is going to set log_min_duration_statement=1000 for PostgreSQL by default. However, this has a possible side effect on a large deployment where  /var/lib/pgsql is mounted separately. The /var/lib/pgsql can be easily filled up
when slow queries are identified. For example, a slow query for selecting facts could consume a large space when there are many facts on a host.

Expected results:

A reasonable log_rotation_size should be set to prevent /var/lib/pgsql being filled up.

Comment 3 sthirugn@redhat.com 2019-12-12 16:36:40 UTC
As per the email discussion, log_rotation_size of 200MB will be implemented to resolve this issue:

log_rotation_size: 200000

Comment 4 sthirugn@redhat.com 2019-12-12 17:48:37 UTC
Created redmine issue https://projects.theforeman.org/issues/28497 from this bug

Comment 5 Bryan Kearney 2019-12-13 23:03:29 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28497 has been resolved.

Comment 9 Devendra Singh 2020-02-14 10:08:12 UTC
Verified on 6.7 Snap11.

#rpm -q foreman-installer

#cat /usr/share/foreman-installer/config/foreman.hiera/tuning/common.yaml 

    merge: hash

apache::mod::passenger::passenger_max_pool_size: 12
apache::mod::passenger::passenger_max_instances_per_app: 6
apache::mod::passenger::passenger_max_request_queue_size: 250
apache::mod::passenger::passenger_stat_throttle_rate: 120
apache::mod::passenger::passenger_max_requests: 10000
apache::mod::passenger::passenger_min_instances: 1
apache::mod::passenger::passenger_max_preloader_idle_time: 0

qpid::open_file_limit: 65536
qpid::router::open_file_limit: 150100

  checkpoint_completion_target: 0.9
  max_connections: 500
  shared_buffers: 512MB
  work_mem: 4MB
  log_line_prefix: '%t '
  log_min_duration_statement: 1000
  log_rotation_size: 200000

Comment 12 errata-xmlrpc 2020-04-14 13:26:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.