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.


  • 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). – Kuberchaun Jan 24 '14 at 17:45

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy