2019-10-23 Greg Clough

postgresql.log file grows infinitely, and never rotates… did your disk fill up previously?

An interesting (and currently undocumented) behaviour of PostgreSQL is that when there is an error writing to the postgresql.log configured in log_filename, that all future log rotations are disabled by this piece of code in syslogger.c: if (errno != ENFILE && errno != EMFILE) { ereport(LOG, (errmsg(“disabling automatic rotation (use SIGHUP to re-enable)”))); rotation_disabled = […]