Re: Performance monitor signal handler - Mailing list pgsql-hackers

From Alfred Perlstein
Subject Re: Performance monitor signal handler
Date
Msg-id 20010313134624.C29888@fw.wintelcom.net
Whole thread Raw
In response to Re: Performance monitor signal handler  (Thomas Swan <tswan-lst@ics.olemiss.edu>)
List 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 by date:

Previous
From: Thomas Swan
Date:
Subject: Re: Performance monitor signal handler
Next
From: Matthew Kirkwood
Date:
Subject: Re: WAL & SHM principles