Feature: Add new PCP command to trigger log rotation
authorBo Peng <pengbo@sraoss.co.jp>
Mon, 5 Aug 2024 06:34:33 +0000 (15:34 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Mon, 5 Aug 2024 06:34:33 +0000 (15:34 +0900)
commit55036fd6c2014786159f8d86a9fbce89c18a259e
tree9253d8667760792c5361781c8e235659cf2e4eb9
parent6a63e2ba0e7d8b0da3c1f7d1bc93f4e53b650966
Feature: Add new PCP command to trigger log rotation

Currently the only way to trigger log rotation in logging collector process
is to send SIGUSR1 signal directly to logging collector process.
However, I think it would be nice to have a better way to do it with an external
tool (e.g. logrotate) without requiring knowledge of the logging collector's PID.

This commit adds a new PCP command "pcp_log_rotate" for triggering log rotation.
18 files changed:
doc.ja/src/sgml/ref/allfiles.sgml
doc.ja/src/sgml/ref/pcp_log_rotate.sgml [new file with mode: 0644]
doc.ja/src/sgml/reference.sgml
doc/src/sgml/ref/allfiles.sgml
doc/src/sgml/ref/pcp_log_rotate.sgml [new file with mode: 0644]
doc/src/sgml/reference.sgml
src/include/pcp/libpcp_ext.h
src/include/pool.h
src/include/watchdog/wd_ipc_defines.h
src/libs/pcp/pcp.c
src/main/pgpool_logger.c
src/main/pgpool_main.c
src/pcp_con/pcp_worker.c
src/test/regression/tests/038.pcp_commands/test.sh [new file with mode: 0755]
src/tools/pcp/.gitignore
src/tools/pcp/Makefile.am
src/tools/pcp/pcp_frontend_client.c
src/watchdog/watchdog.c