Compare commits
2 commits
ac98aa2d18
...
6c4f696ec5
Author | SHA1 | Date | |
---|---|---|---|
Eric Morino | 6c4f696ec5 | ||
Eric Morino | 0bda633b0c |
|
@ -10,9 +10,13 @@
|
|||
state: restarted
|
||||
|
||||
- name: restart postgresql
|
||||
service:
|
||||
systemd:
|
||||
name: postgresql
|
||||
state: restarted
|
||||
daemon_reload: yes
|
||||
|
||||
- name: reload systemd
|
||||
command: systemctl daemon-reload
|
||||
|
||||
- name: Restart minifirewall
|
||||
command: /etc/init.d/minifirewall restart
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
---
|
||||
- name: Override PostgreSQL systemd unit
|
||||
template:
|
||||
src: postgresql.service.j2
|
||||
dest: /etc/systemd/system/multi-user.target.wants/postgresql.service
|
||||
force: yes
|
||||
notify:
|
||||
- reload systemd
|
||||
- restart postgresql
|
||||
|
||||
- name: Allow conf.d/*.conf files to be included in PostgreSQL configuration
|
||||
lineinfile:
|
||||
name: "/etc/postgresql/{{postgresql_version}}/main/postgresql.conf"
|
||||
|
|
19
postgresql/templates/postgresql.service.j2
Normal file
19
postgresql/templates/postgresql.service.j2
Normal file
|
@ -0,0 +1,19 @@
|
|||
# systemd service for managing all PostgreSQL clusters on the system. This
|
||||
# service is actually a systemd target, but we are using a service since
|
||||
# targets cannot be reloaded.
|
||||
|
||||
[Unit]
|
||||
Description=PostgreSQL RDBMS
|
||||
|
||||
[Service]
|
||||
OOMScoreAdjust=-1000
|
||||
Environment=PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj
|
||||
Environment=PG_MASTER_OOM_SCORE_ADJ=-1000
|
||||
Environment=PG_CHILD_OOM_SCORE_ADJ=0
|
||||
Type=oneshot
|
||||
ExecStart=/bin/true
|
||||
ExecReload=/bin/true
|
||||
RemainAfterExit=on
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in a new issue