prevent disk writes when idle

https://wiki.archlinux.org/index.php/PostgreSQL#Prevent_disk_writes_when_idle
This commit is contained in:
Pig Monkey 2016-02-18 12:19:53 -08:00
parent b8e3c407ae
commit 9cf3c330c0

View file

@ -18,6 +18,14 @@
notify:
- restart postgresql
- name: Prevent disk writes when idle
lineinfile: dest=/var/lib/postgres/data/postgresql.conf
regexp=^stats_temp_directory
state=present
line="stats_temp_directory = '/run/postgresql'"
notify:
- restart postgresql
- name: Disable and stop PostgreSQL
service: name=postgresql.service enabled=no state=stopped
when: postgresql is not defined or postgresql.enable is not defined or postgresql.enable != True