Re: get current log file

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: get current log file
Дата
Msg-id CA+TgmoZojvuqL+3YTrXjWCHdzd7YOXN62pf0wnqy6KyAD7p8GQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: get current log file  (Euler Taveira <euler@timbira.com.br>)
Ответы Re: get current log file  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Feb 25, 2016 at 1:15 AM, Euler Taveira <euler@timbira.com.br> wrote:
> 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).

(1) seems like a bad idea, because IIUC, the syslogger process doesn't
currently touch shared memory.  And in fact, shared memory can be
reset after a backend exits abnormally, but the syslogger (alone among
all PostgreSQL processes other than the postmaster) lasts across
multiple such resets.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Catalin Iacob
Дата:
Сообщение: Re: proposal: PL/Pythonu - function ereport
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [PATCH v5] GSSAPI encryption support