Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> You could doubtless maintain a fairly good approximate total this
>> way, and that would be highly useful for some applications ...
>> but it isn't COUNT(*).
> With MVCC allowing multiple rows with only one visible, I thought the
> INSERT/DELETE system would work --- once the delete becomes visible, the
> change becomes visible.
Oh, you're imagining the cache as being a row in an ordinary table?
I doubt that could work. Multiple transactions trying to update these
rows would suffer from contention and deadlock problems, wouldn't they?
regards, tom lane