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?
Postgresql – To get rid of heavy archive logs in PostgreSQL 9.1
postgresql-9.1
Related Question
- Postgresql – RIGHT() function in postgresql 9.1 not behaving as anticipated
- Postgresql 9.1 failed insert occupies increasing disk space
- Postgresql – Upgrade PostgreSQL 9.1 to 9.3 and server no longer starts
- Postgresql – enabling fsync in postgresql 9.1
- PostgreSQL 9.1 runs into inconsistent data, but pg_dump corrects the problem
- Postgresql – Migrating PostgreSQL 9.1 database to Ubuntu 14.04
- Postgresql – Fragmentation in PostgreSQL 9.1
Best Answer
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 toERROR
log_min_messages
: can be set toERROR
log_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.