Re: get current log file
От | Euler Taveira |
---|---|
Тема | Re: get current log file |
Дата | |
Msg-id | 56CE0850.30001@timbira.com.br обсуждение исходный текст |
Ответ на | Re: get current log file ("Armor" <yupengstone@qq.com>) |
Ответы |
Re: get current log file
|
Список | pgsql-hackers |
On 02-02-2016 10:22, Armor wrote: > As we known, the name of current log file depends on the number of > seconds (for simple, later I will call it last_syslogger_file_time) > since Epoch when create new log file. So, for this feature, the key is > how syslogger process pass last_syslogger_file_time to backend processes. > I didn't like the name. Let's call it syslogger_file_name. It describes what the variable is (actual file name that syslogger is writing on). > To pass last_syslogger_file_time, we have 2 solutions: 1, add a > global variable to record last_syslogger_file_time which shared by > backends and syslogger, so backends can get last_syslogger_file_time > very easily; 2 syslogger process send last_syslogger_file_time to pgstat > process when last_syslogger_file_time changes, just as other auxiliary > processes send stat message to pgstat process, and pgstat process will > write last_syslogger_file_time into stat file so that backend can > get last_syslogger_file_time via reading this stat file. > I prefer (1) because (i) logfile name is not statistics and (ii) stats collector could not respond in certain circumstances (and even discard some messages). -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte24x7 e Treinamento
В списке pgsql-hackers по дате отправления: