From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Greg Stark <stark(at)mit(dot)edu>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Reopen logfile on SIGHUP |
Date: | 2018-02-27 23:45:15 |
Message-ID: | 12572.1519775115@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Tue, Feb 27, 2018 at 4:12 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> IOW, I think a fair response to this is "if you're using logrotate with
>> Postgres, you're doing it wrong". That was of some use back before we
>> spent so much sweat on the syslogger, but it's not a reasonable setup
>> today.
> A couple of weeks ago a message was posted to general [1] in which I
> concluded the desired behavior is not supported natively. I'm curious
> whether better advice than mine can be given ...
The particular behavior that guy wanted would require some new %-escape
in the log_filename parameter. Essentially we'd need to keep an
increasing sequence counter for log files and have it wrap around at some
user-specified count (5 in his example), then add a %-escape to include
the counter value in the generated filename. It's not an unreasonable
idea, if somebody wanted to code it up.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2018-02-28 00:21:03 | Re: [HACKERS] GSoC 2017: weekly progress reports (week 6) |
Previous Message | Andres Freund | 2018-02-27 23:39:18 | Re: Reopen logfile on SIGHUP |