Re: Reopen logfile on SIGHUP

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Reopen logfile on SIGHUP
Дата
Msg-id 9886.1519773165@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Reopen logfile on SIGHUP  (Andres Freund <andres@anarazel.de>)
Ответы Re: Reopen logfile on SIGHUP
Re: Reopen logfile on SIGHUP
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2018-02-27 22:32:41 +0000, Greg Stark wrote:
>> On 27 February 2018 at 14:41, Anastasia Lubennikova
>> <a.lubennikova@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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Kazimiers
Дата:
Сообщение: Re: Unexpected behavior with transition tables in update statementtrigger
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Sigh, I broke crake again