"Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com> writes:
> I am sure this must have been discussed before.
Indeed. Apparently you didn't find the threads in which the idea of
having transactions enter "delta" entries was discussed? Solves both
the locking and the MVCC problems, at the cost that you need to make
cleanup passes over the counter table fairly often.
I don't see this as material for the core DB but it would make a great
contrib module.
regards, tom lane