Equivalent of logrotate on OSX
Based on Brian Armstrong’s answer, here’s something with a little more explanation and a correction. This handles the log created by postgres on OSX installed by Homebrew. Located at /etc/newsyslog.d/postgresql.conf: # logfilename [owner:group] mode count size(KB) when flags [/pid_file] [sig_num] /usr/local/var/postgres/postgresql.log : 600 2 2048 * J /usr/local/var/postgres/postmaster.pid This will rotate the log file when … Read more