Thomas Kellerer <spam_eater(at)gmx(dot)net> writes:
> Can a trigger solution really give an accurate count in a concurrent insert/delete scenario?
In principle yes, but AFAIK no one has really coded it up in full
detail. See the design that was hashed out in some previous
mailing-list thread, involving delta-count records entered into
a tracking table by each transaction that inserts or deletes.
regards, tom lane