Re: Log rotation

Поиск
Список
Период
Сортировка
От Fernando Nasser
Тема Re: Log rotation
Дата
Msg-id 4051C81C.80909@redhat.com
обсуждение исходный текст
Ответ на Re: Log rotation  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Log rotation  (Bruno Wolff III <bruno@wolff.to>)
Re: Log rotation  (Lamar Owen <lowen@pari.edu>)
Список pgsql-hackers
Tom Lane wrote:
> Fernando Nasser <fnasser@redhat.com> writes:
> 
>>Please remind me again why the postmaster cannot close and open the log 
>>file when it receives a SIGHUP (to re-read configuration)?
> 
> 
> (a) Because it never opened it in the first place --- the log file is
> whatever was passed as stderr.
> 
> (b) Because it would not be sufficient to make the postmaster itself
> close and reopen the file; every child process would have to do so also.
> Doing this in any sort of synchronized fashion seems impossible.
> 

Now I remember.  Thanks for reminding me of that.




> It's much cleaner to have stderr be a pipe to some separate collector
> program that can handle log rotation (ie, the Apache solution).
> 

We could also create a pipe and start a new process ("logger") and give 
it the other end of the pipe and the name of the log file.  We could 
send it a SIGHUP after we reread the configuration file.

But just doing a pipe on the OS level is way simpler.


I don't really care on how its done, but IMO an enterprise class 
database must be able to do log rotation.  Logging to Syslog is not an 
option (specially with our verbosity) -- users must be able to use flat 
files for logging.


I never seem some many customer complaints and bug reports about a 
single item like the ones we have received here about logging.  I think 
this should be the number 1 item in te TODO list.



Thanks again for the clarifications.

Regards,
Fernando


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

Предыдущее
От: Andreas Pflug
Дата:
Сообщение: Re: The Name Game: postgresql.net vs. pgfoundry.org
Следующее
От: Tom Lane
Дата:
Сообщение: Re: client side syntax error localisation for psql (v1)