From cf1e17d758c4f81f07d7f678dbb426cf75fe0df0 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 5 Oct 2017 15:26:30 +0900 Subject: [PATCH] Document log rotation --- doc/repmgrd-configuration.sgml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/doc/repmgrd-configuration.sgml b/doc/repmgrd-configuration.sgml index 07f4c82b..6ae80a94 100644 --- a/doc/repmgrd-configuration.sgml +++ b/doc/repmgrd-configuration.sgml @@ -70,5 +70,25 @@ PostgreSQL documentation. - + + repmgrd log rotation + + To ensure the current repmgrd logfile does not grow + indefinitely, configure your system's logrotate to + regularly rotate it. + + + Sample configuration to rotate logfiles weekly with retention for + up to 52 weeks and rotation forced if a file grows beyond 100Mb: + + /var/log/postgresql/repmgr-9.6.log { + missingok + compress + rotate 52 + maxsize 100M + weekly + create 0600 postgres postgres + } + +