diff --git a/roles/abrt/faf-local/handlers/main.yml b/roles/abrt/faf-local/handlers/main.yml index e379288d84..1ac3f2273f 100644 --- a/roles/abrt/faf-local/handlers/main.yml +++ b/roles/abrt/faf-local/handlers/main.yml @@ -1,3 +1,7 @@ --- - name: restart httpd service: name=httpd state=restarted + +- name: restart postgresql + service: name=postgresql + state=restarted diff --git a/roles/abrt/faf-local/tasks/setup_db.yml b/roles/abrt/faf-local/tasks/setup_db.yml index cd8d77ef13..406c5682e2 100644 --- a/roles/abrt/faf-local/tasks/setup_db.yml +++ b/roles/abrt/faf-local/tasks/setup_db.yml @@ -1,4 +1,67 @@ --- +- name: set max_connections for PostgreSQL + lineinfile: + path: /var/lib/pgsql/data/postgresql.conf + regexp: '^max_connections =' + line: 'max_connections = 150' + notify: restart postgresql + +- name: set shared_buffers for PostgreSQL + lineinfile: + path: /var/lib/pgsql/data/postgresql.conf + regexp: '^shared_buffers =' + line: 'shared_buffers = 33536MB' + notify: restart postgresql + +- name: set effective_cache_size for PostgreSQL + lineinfile: + path: /var/lib/pgsql/data/postgresql.conf + regexp: '^effective_cache_size =' + line: 'effective_cache_size = 100608MB' + notify: restart postgresql + +- name: set work_mem for PostgreSQL + lineinfile: + path: /var/lib/pgsql/data/postgresql.conf + regexp: '^work_mem =' + line: 'work_mem = 114MB' + notify: restart postgresql + +- name: set maintenance_work_mem for PostgreSQL + lineinfile: + path: /var/lib/pgsql/data/postgresql.conf + regexp: '^maintenance_work_mem =' + line: 'maintenance_work_mem = 2GB' + notify: restart postgresql + +- name: set checkpoint_segments for PostgreSQL + lineinfile: + path: /var/lib/pgsql/data/postgresql.conf + regexp: '^checkpoint_segments =' + line: 'checkpoint_segments = 32' + notify: restart postgresql + +- name: set checkpoint_completion_target for PostgreSQL + lineinfile: + path: /var/lib/pgsql/data/postgresql.conf + regexp: '^checkpoint_completion_target =' + line: 'checkpoint_completion_target = 0.9' + notify: restart postgresql + +- name: set wal_buffers for PostgreSQL + lineinfile: + path: /var/lib/pgsql/data/postgresql.conf + regexp: '^wal_buffers =' + line: 'wal_buffers = 16MB' + notify: restart postgresql + +- name: set default_statistics_target for PostgreSQL + lineinfile: + path: /var/lib/pgsql/data/postgresql.conf + regexp: '^default_statistics_target =' + line: 'default_statistics_target = 100' + notify: restart postgresql + - name: drop faf database postgresql_db: name=faf owner=postgres