In our production server which is having PostgreSQL 9.1 installed, too heavy archive logs are being generated, approximately 41 GB/day. Heavy updates, deletes and inserts are the cause of this. Can anyone help us to reduce the amount of archive log generation in our production server?
Asked
Active
Viewed 265 times
1 Answers
0
If you don't need to analyze again that log. You can reduce the things that database will be log. Some of them are:
log_statement: Controls which SQL statements are logged. You don't need to log all statement. It can be switched tonone.client_min_messages: can be set toERRORlog_min_messages: can be set toERRORlog_min_duration_statement: can be set to a-1- this means disable it.
All of them are store in file configuration postgresql.conf
You can read more document here.
Hopefully this answer will help you.
Mabu Kloesen
- 261
- 2
- 3
test ! -f /where/you/store/archive/%f && gzip < %p > /where/you/store/archive/%f– Mabu Kloesen Jan 22 '18 at 09:31
– Mabu Kloesen Jan 22 '18 at 11:45gunzip < /where/you/store/archive/%f > "%p"I think basically you can reduce the number but the file size will be bigger, so the total size is not changed.
– Mabu Kloesen Jan 23 '18 at 10:16