Re: Performance monitor signal handler

From: Alfred Perlstein <bright(at)wintelcom(dot)net>
To: Thomas Swan <tswan-lst(at)ics(dot)olemiss(dot)edu>
Cc: Philip Warner <pjw(at)rhyme(dot)com(dot)au>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Performance monitor signal handler
Date: 2001-03-13 21:46:25
Message-ID: 20010313134624.C29888@fw.wintelcom.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Thomas Swan <tswan-lst(at)ics(dot)olemiss(dot)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(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthew Kirkwood 2001-03-13 21:54:08 Re: WAL & SHM principles
Previous Message Thomas Swan 2001-03-13 21:36:59 Re: Performance monitor signal handler