Richard Huxton <dev(at)archonet(dot)com> writes:
> Anony Mous wrote:
>> select count(*) from pg_stat_activity
> Do you have multiple live connections? My understanding of
> pg_stat_activity is that it can lag slightly behind the current state of
> the system.
If memory serves, it's up to 500 msec behind. So this technique has
never been 100% accurate. I'm not sure why A.Mous failed to observe the
inaccuracy before ...
regards, tom lane