Re: Patch to implement pg_current_logfile() function
От | Tom Lane |
---|---|
Тема | Re: Patch to implement pg_current_logfile() function |
Дата | |
Msg-id | 676.1457706123@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Patch to implement pg_current_logfile() function (Gilles Darold <gilles.darold@dalibo.com>) |
Ответы |
Re: Patch to implement pg_current_logfile() function
|
Список | pgsql-hackers |
Gilles Darold <gilles.darold@dalibo.com> writes: > Le 11/03/2016 10:49, Shulgin, Oleksandr a écrit : >> 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. Yeah, a symlink is impossible to update atomically (on most platforms anyway). Plain file containing the pathname seems better. Another point is that we might not necessarily want *only* the pathname in there. postmaster.pid has accreted more stuff over time, and this file might too. I can see wanting the syslogger PID in there, for example, so that onlookers can detect a totally stale file. (Not proposing this right now, just pointing out that it's a conceivable future feature.) regards, tom lane
В списке pgsql-hackers по дате отправления: