Re: Patch to implement pg_current_logfile() function
От | Gilles Darold |
---|---|
Тема | Re: Patch to implement pg_current_logfile() function |
Дата | |
Msg-id | 56E1CEE0.5020301@dalibo.com обсуждение исходный текст |
Ответ на | Re: Patch to implement pg_current_logfile() function (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Patch to implement pg_current_logfile() function
|
Список | pgsql-hackers |
Le 10/03/2016 16:26, Tom Lane a écrit : > Robert Haas <robertmhaas@gmail.com> writes: >> On Wed, Mar 9, 2016 at 12:32 PM, Gilles Darold <gilles.darold@dalibo.com> wrote: >>> I choose to allow the log collector to write his current log file name >>> into the lock file 'postmaster.pid'. >> Gosh, why? Piggybacking this on a file written for a specific purpose >> by a different process seems like making life very hard for yourself, >> and almost certainly a recipe for bugs. > That's a *complete* nonstarter. postmaster.pid has to be written by the > postmaster process and nobody else. > > It's a particularly bad choice for the syslogger, which will exist > fractionally longer than the postmaster, and thus might be trying to write > into the file after the postmaster has removed it. I was thinking that the lock file was removed after all and that postmaster was waiting for all childs die before removing it, but ok I know why this was not my first choice, this was a very bad idea :-) Then, should I have to use an alternate file to store the information or implement a bidirectional communication with the syslogger? The last solution looks like really too much for this very simple feature. With an alternate file what is the best place where it has to be written? All places have their special use, the global/ directory? -- Gilles Darold Consultant PostgreSQL http://dalibo.com - http://dalibo.org
В списке pgsql-hackers по дате отправления: