pgsql: Implement "pg_ctl logrotate" command
От | Alexander Korotkov |
---|---|
Тема | pgsql: Implement "pg_ctl logrotate" command |
Дата | |
Msg-id | E1fw97c-0003QR-9f@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Implement "pg_ctl logrotate" command Currently there are two ways to trigger log rotation in logging collector process: call pg_rotate_logfile() SQL-function or send SIGUSR1 signal directly to logging collector process. However, it's nice to have more suitable way for external tools to do that, which wouldn't require SQL connection or knowledge of logging collector pid. This commit implements triggering log rotation by "pg_ctl logrotate" command. Discussion: https://postgr.es/m/20180416.115435.28153375.horiguchi.kyotaro%40lab.ntt.co.jp Author: Kyotaro Horiguchi, Alexander Kuzmenkov, Alexander Korotkov Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ec74369931687885cfb6ce9dac55deefdb410086 Modified Files -------------- doc/src/sgml/maintenance.sgml | 34 +++++++++++++- doc/src/sgml/ref/pg_ctl-ref.sgml | 13 ++++++ src/backend/postmaster/postmaster.c | 18 ++++++-- src/backend/postmaster/syslogger.c | 29 +++++++++++- src/bin/pg_ctl/pg_ctl.c | 89 ++++++++++++++++++++++++++++++++----- src/bin/pg_ctl/t/004_logrotate.pl | 42 +++++++++++++++++ src/include/postmaster/syslogger.h | 3 ++ src/test/perl/PostgresNode.pm | 21 +++++++++ 8 files changed, 230 insertions(+), 19 deletions(-)
В списке pgsql-committers по дате отправления: