Re: Reopen logfile on SIGHUP

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: a(dot)kuzmenkov(at)postgrespro(dot)ru
Cc: sk(at)zsrv(dot)org, tgl(at)sss(dot)pgh(dot)pa(dot)us, robertmhaas(at)gmail(dot)com, andres(at)anarazel(dot)de, stark(at)mit(dot)edu, a(dot)lubennikova(at)postgrespro(dot)ru, pgsql-hackers(at)postgresql(dot)org, g(dot)smolkin(at)postgrespro(dot)ru
Subject: Re: Reopen logfile on SIGHUP
Date: 2018-08-09 07:33:15
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


At Tue, 7 Aug 2018 16:36:34 +0300, Alexander Kuzmenkov <a(dot)kuzmenkov(at)postgrespro(dot)ru> wrote in <a9d2ad92-b4f9-42fb-77eb-f3085b964705(at)postgrespro(dot)ru>
> I think the latest v4 patch addresses the concerns raised
> upthread. I'm marking the commitfest entry as RFC.

Thank you, but it is forgetting pg_ctl --help output. I added it
and moved logrotate entry in docs just above "kill" in
app-pg-ctl.html. Also added "-s" option.

Furthermore, I did the following things.

- Since I'm not sure unlink is signal-handler safe on all
supported platforms, I moved unlink() call out of
checkLogrotateSignal() to SysLoggerMain, just before rotating
log file.

- Refactored moving the main stuff to syslogger.c.

- The diff is splitted into two files and renamed. (but version
number continues to v5).

I'm not certain whether to allow the signal file alone cause
rotation, but this patch doesn't. Directly placed signal file is
to be removed without causing rotation.

Please find the attached.


Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
v5-0001-New-pg_ctl-subcommand-logrotate.patch text/x-patch 8.8 KB
v5-0002-Documentation-for-pg_ctl-logrotate.patch text/x-patch 4.5 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2018-08-09 07:45:08 Re: Typo in optimizer/README
Previous Message Tatsuro Yamada 2018-08-09 07:22:38 Typo in optimizer/README