Re: Performance monitor signal handler

Поиск
Список
Период
Сортировка
От Alfred Perlstein
Тема Re: Performance monitor signal handler
Дата
Msg-id 20010313134624.C29888@fw.wintelcom.net
обсуждение исходный текст
Ответ на Re: Performance monitor signal handler  (Thomas Swan <tswan-lst@ics.olemiss.edu>)
Список pgsql-hackers
* Thomas Swan <tswan-lst@ics.olemiss.edu> [010313 13:37] wrote:
> 
> >On reciept of the info signal, the backends collaborate to piece
> >together a status file.  The status file is given a temporay name.
> >When complete the status file is rename(2)'d over a well known
> >file.
> 
> Reporting to files, particularly well known ones, could lead to race 
> conditions.
> 
> All in all, I think your better off passing messages through pipes or a 
> similar communication method.
> 
> I really liked the idea of a "server" that could parse/analyze data from 
> multiple backends.
> 
> My 2/100 worth...

Take a few moments to think about the semantics of rename(2).

Yes, you would still need syncronization between the backend
processes to do this correctly, but not any external app.

The external app can just open the file, assuming it exists it
will always have a complete and consistant snapshot of whatever
the backends agreed on.

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/



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

Предыдущее
От: Thomas Swan
Дата:
Сообщение: Re: Performance monitor signal handler
Следующее
От: Matthew Kirkwood
Дата:
Сообщение: Re: WAL & SHM principles