Andres Freund <and...@anarazel.de> writes: > On 2018-02-27 22:32:41 +0000, Greg Stark wrote: >> On 27 February 2018 at 14:41, Anastasia Lubennikova >> <a.lubennik...@postgrespro.ru> wrote: >>> Small patch in the attachment implements logfile reopeninig on SIGHUP.
>> HUP will cause Postgres to reload its config files. That seems like a >> fine time to reopen the log files as well but it would be nice if >> there was also some way to get it to *just* do that and not reload the >> config files. > Is that an actually important thing to be able to do? Yeah, after further consideration I'm having a hard time seeing the point of this patch. The syslogger already has plenty sufficient knobs for controlling when it rotates its output file. If you're not using those, I think the answer is to start using them, not to make the syslogger's behavior even more complicated so you can avoid learning about them. 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. There'd be a point to this perhaps in configurations *not* using the syslogger, but it's patching the wrong place for that case. (I'm not sure there is a right place, unfortunately --- we don't have any good way to redirect postmaster stderr after launch, since so many processes would have to individually redirect.) regards, tom lane