From: | Alfred Perlstein <bright(at)wintelcom(dot)net> |
---|---|
To: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
Cc: | 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 14:38:19 |
Message-ID: | 20010313063818.T29888@fw.wintelcom.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Philip Warner <pjw(at)rhyme(dot)com(dot)au> [010312 18:56] wrote:
> At 13:34 12/03/01 -0800, Alfred Perlstein wrote:
> >Is it possible
> >to have a spinlock over it so that an external utility can take a snapshot
> >of it with the spinlock held?
>
> I'd suggest that locking the stats area might be a bad idea; there is only
> one writer for each backend-specific chunk, and it won't matter a hell of a
> lot if a reader gets inconsistent views (since I assume they will be
> re-reading every second or so). All the stats area should contain would be
> a bunch of counters with timestamps, I think, and the cost up writing to it
> should be kept to an absolute minimum.
>
>
> >
> >just some ideas..
> >
>
> Unfortunatley, based on prior discussions, Bruce seems quite opposed to a
> shared memory solution.
Ok, here's another nifty idea.
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.
This ought to always give a consistant snapshot of the file to
whomever opens it.
--
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Warner | 2001-03-13 14:42:18 | Re: Performance monitor signal handler |
Previous Message | Philip Warner | 2001-03-13 13:44:07 | Re: createdb and template0? |