Re: bgwriter stats - Mailing list pgsql-patches

From Tom Lane
Subject Re: bgwriter stats
Date
Msg-id 3195.1174359651@sss.pgh.pa.us
Whole thread Raw
In response to Re: bgwriter stats  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> Tom Lane wrote:
>> This seems quite a bizarre way to do things.  Why wouldn't you implement
>> this functionality by shipping messages to the stats collector?

> Would that have any benefits over the shmem approach?

Well, for one thing, it would fit naturally into the existing stats
structure instead of being a wart on the side.  The problem of atomic
access to an int64 would go away, yet we'd still be able to keep a
running int64 total of the reports.  You wouldn't lose the total over a
shutdown/restart.  The value would obey the transactional-snapshot rules
we've established for stats output, making it safe to try to correlate
it with other stats.  Probably a few other things I'm not thinking of...

            regards, tom lane

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: bgwriter stats
Next
From: Tom Lane
Date:
Subject: Re: bgwriter stats