Re: Patch to implement pg_current_logfile() function
От | Gilles Darold |
---|---|
Тема | Re: Patch to implement pg_current_logfile() function |
Дата | |
Msg-id | 56E2C541.9000508@dalibo.com обсуждение исходный текст |
Ответ на | Re: Patch to implement pg_current_logfile() function ("Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>) |
Ответы |
Re: Patch to implement pg_current_logfile() function
|
Список | pgsql-hackers |
Le 11/03/2016 10:49, Shulgin, Oleksandr a écrit :
On Thu, Mar 10, 2016 at 9:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:Gilles Darold <gilles.darold@dalibo.com> writes:
> Then, should I have to use an alternate file to store the information or
> implement a bidirectional communication with the syslogger?
I'd just define a new single-purpose file $PGDATA/log_file_name
or some such.Would it make sense to have it as a symlink instead?
The only cons I see is that it can be more "difficult" with some language to gather the real path, but do we really need it? There is also little time where the symlink doesn't exist, this is when it needs to be removed before being recreated to point to the new log file. If your external script try to reopen the log file at this moment it will complain that file doesn't exists and looping until the file exists is probably a bad idea.
-- Gilles Darold Consultant PostgreSQL http://dalibo.com - http://dalibo.org
В списке pgsql-hackers по дате отправления: