mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +03:00
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
This commit is contained in:
@@ -97,6 +97,13 @@ PostgreSQL documentation
|
||||
<arg choice="opt"><option>-s</option></arg>
|
||||
</cmdsynopsis>
|
||||
|
||||
<cmdsynopsis>
|
||||
<command>pg_ctl</command>
|
||||
<arg choice="plain"><option>logrotate</option></arg>
|
||||
<arg choice="opt"><option>-D</option> <replaceable>datadir</replaceable></arg>
|
||||
<arg choice="opt"><option>-s</option></arg>
|
||||
</cmdsynopsis>
|
||||
|
||||
<cmdsynopsis>
|
||||
<command>pg_ctl</command>
|
||||
<arg choice="plain"><option>kill</option></arg>
|
||||
@@ -226,6 +233,12 @@ PostgreSQL documentation
|
||||
and begin read-write operations.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<option>logrotate</option> mode rotates the server log file.
|
||||
For details on how to use this mode with external log rotation tools, see
|
||||
<xref linkend="logfile-maintenance"/>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<option>kill</option> mode sends a signal to a specified process.
|
||||
This is primarily valuable on <productname>Microsoft Windows</productname>
|
||||
|
Reference in New Issue
Block a user