Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

How to make postgres 9.1 log to have maximum size 5GB and to be circle when comes to 5GB ? At the moment my log file is over 500GB.

/var/lib/postgres/

share|improve this question

migrated from stackoverflow.com Jan 24 '14 at 17:42

This question came from our site for professional and enthusiast programmers.

1  
What postgres log are you talking about? Can you specify the file names? –  Igor Romanchenko Jan 24 '14 at 14:26
    
Also provide your log settings. I would assume it's currently set to 500GB at minimum or you were really lucky and found a bug(not likely). –  Bob Jan 24 '14 at 17:45

1 Answer 1

Have you tried setting log_rotation_size as described in http://www.postgresql.org/docs/9.1/static/runtime-config-logging.html#GUC-LOG-ROTATION-SIZE ? That would work if the log is managed directly by postgresql. If you are using syslog then you should look at newsyslog or logrotate.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.