Skip to content

Commit c10fdcc

Browse files
committed
Merge branch 'feature/supabasePostgresV1.0' of github.com:supabase/postgres into feature/supabasePostgresV1.0
2 parents 34cc677 + 979db2d commit c10fdcc

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

ansible/files/logrotate-postgres

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
/var/lib/postgresql/12/main/pg_log/postgresql.csv {
2-
daily
3-
size 50M
1+
/var/lib/postgresql/data/pg_log/postgresql.log {
2+
size 50M
43
rotate 3
54
copytruncate
65
delaycompress
76
compress
87
notifempty
98
missingok
10-
}
9+
}

ansible/playbook.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@
9696
src: files/logrotate-postgres
9797
dest: /etc/logrotate.d/postgres
9898

99+
- name: Configure logrotation to run every hour
100+
shell:
101+
cmd: mv /etc/cron.daily/logrotate /etc/cron.hourly/
102+
become: yes
103+
104+
- name: restart crond
105+
systemd:
106+
state: restarted
107+
name: cron
108+
become: yes
109+
99110
- name: Enhance fail2ban
100111
import_tasks: tasks/setup-fail2ban.yml
101112

0 commit comments

Comments
 (0)