Hello, there.
I'm trying to configure
Under Linux, it is done using the copytruncate
Awaiting your answers,
Regards.
I'm trying to configure
newsyslog
to rotate PostgreSQL logs, but I ran into a problem: PostgreSQL can't be told to reopen its log files, unless by rebooting it, but I can't do that on a production server.Under Linux, it is done using the copytruncate
logrotate
option, which instructs to copy the log file in the archive and then truncate the log file, instead of simply moving it away. This way, there is no need for the daemon to reopen its file, as it has not been moved. The thing is, I can't find newsyslog
equivalent for this option. I could install logrotate, write my own log rotation script or use PgSQL integrated log file management, but that seems overkill, and I would be surprised to be forced to use something else than newsyslog
. PostgreSQL is rather mainstream, so I assume there is a way to use newsyslog
with it, but how? Did someone already encountered this problem? What was your solution?Awaiting your answers,
Regards.