I installed PostgreSQL on my mac using homebrew and it's been working great. I recently increased the amount of logging going on because I need to use pgbadger, so naturally I set up log rotation using newsyslog. But when it rotates the log, PostgreSQL doesn't start logging to it until I restart it. The new log file just has this message:

Feb  5 10:30:00 MacBook-Pro newsyslog[89092]: logfile turned over due to size>4096K

Is there something I can do to either newsyslog or postgres to make it continue logging after rotating the log file?

  • System logs are natively rotated in macOS. Try disabling newsyslog.
    – Allan
    Commented Feb 5, 2020 at 17:54
  • @Allan newsyslog is how it natively rotates the logs. Commented Feb 5, 2020 at 18:40
  • It doesn’t need to be setup
    – Allan
    Commented Feb 5, 2020 at 19:48
  • It does if you installed with homebrew, because homebrew installed postgresql logs go to /usr/local/var/log. Commented Feb 6, 2020 at 2:36


You must log in to answer this question.

Browse other questions tagged .