[pgpool-general: 5990] Re: pgpool.log rotation
ishii at sraoss.co.jp
Thu Mar 8 07:29:49 JST 2018
>> What do you mean by stopped the command before starting ? stopped what
>> exactly ?
> I thought you restarted pgpool next day. Now I realize you haven't
> restarted pgpool. So please ignore my question.
> I tested something like:
> pgpool ... 2>&1 | /usr/bin/rotatelogs -c -l -v -f /tmp/pgpool.log.%c 15 &
> and rotatelog created:
> /tmp/pgpool.log.Tue Mar 6 11:15:00 2018
> /tmp/pgpool.log.Tue Mar 6 11:15:15 2018
> /tmp/pgpool.log.Tue Mar 6 11:15:30 2018
> as expected (this is Ubuntu 16). Let me try with 86400 instead of 15
It worked as expected.
File rotation needed, reason: Time interval expired
Opening file /tmp/pgpool.log.Wednesday
Closing file /tmp/pgpool.log.Tuesday
And the new log contains some output from Pgpool-II:
$ cat /tmp/pgpool.log.Thursday
2018-03-08 06:06:45: pid 30858: LOG: child process with pid: 30863 exits with status 256
2018-03-08 06:06:45: pid 30858: LOG: fork a new child process with pid: 15676
SRA OSS, Inc. Japan
>> 2018-03-06 4:23 GMT+02:00 Tatsuo Ishii <ishii at sraoss.co.jp>:
>>> > Hi,
>>> > I used the next command to start the pool and to start the log rotation :
>>> > pgpool -n 2>&1 | /usr/sbin/rotatelogs -l -f
>>> > /PostgreSQL/pgpool/log/pgpool.log.%A 86400 &
>>> > pgpool started and the log was named : pgpool.log.Wednesday
>>> > However, the next day after running this command, a new log is created at
>>> > 01:11 am but the log is stuck and nothing is written to it. Right now my
>>> > logs name is pgpool.log.Thursday and nothing is written to it. A new log
>>> > created but nothing is written to all the logs..
>>> Have you stopped the command before starting? I guess rotatelogs
>>> process reamains.
>>> Best regards,
>>> Tatsuo Ishii
>>> SRA OSS, Inc. Japan
>>> English: http://www.sraoss.co.jp/index_en.php
More information about the pgpool-general