[pgpool-general: 5991] Re: pgpool.log rotation

Mariel Cherkassky mariel.cherkassky at gmail.com
Mon Mar 12 01:16:31 JST 2018


I run the command:
 pgpool -n 2>&1 | /usr/sbin/rotatelogs -l -c -v -f
/PostgreSQL/pgpool/log/pgpool.log.%c 15 &
because of the flag '&' it suppose to work in the background. However, when
I exit my current session pgpool continues to work but the rotation stopps.

2018-03-08 0:29 GMT+02:00 Tatsuo Ishii <ishii at sraoss.co.jp>:

> >> 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
> > tonight.
>
> 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
>
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
>
> >> 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
> >>> is
> >>> > 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
> >>> Japanese:http://www.sraoss.co.jp
> >>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20180311/fee753fb/attachment.html>


More information about the pgpool-general mailing list