Re: Reopen logfile on SIGHUP

From: Alexander Kuzmenkov <a(dot)kuzmenkov(at)postgrespro(dot)ru>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: 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-04-20 18:51:49
Message-ID: c7cd74db-dde3-49e7-cdde-b909b0fdac0b@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/16/2018 05:54 AM, Kyotaro HORIGUCHI wrote:
> We can provide a new command "pg_ctl logrotate" to hide the
> details. (It cannot be executed by root, though.)

I like this approach.

I looked at the patch and changed some things:
- cleaned up the error messages
- moved checkLogrotateSignal to postmaster.c, since it has no reason to
be in xlog.c
- added some documentation I had from my older patch

Other than that, it looks good to me. The updated patch is attached.

--
Alexander Kuzmenkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
pg_ctl_logrotate_v2.patch text/x-patch 7.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2018-04-20 19:56:22 Re: Toast issues with OldestXmin going backwards
Previous Message Alvaro Herrera 2018-04-20 18:28:29 Re: Should we add GUCs to allow partition pruning to be disabled?