Gurjeet Singh <singh.gurj...@gmail.com> writes: > On Wed, Jun 15, 2011 at 10:31 AM, Robert Haas <robertmh...@gmail.com> wrote: >> Well, that would probably be a lot slower, and wouldn't necessarily >> deliver as consistent a snapshot of system activity. It's better to >> have one set-returning function that dumps out all the data in a >> single pass.
> I wanted to address consistency issue in the previous mail, but then wanted > that to be left for later. > We can provide consistency the same way pg_locks provides; take a snapshot > on first request within a transaction, and reuse that snapshot for > subsequent calls. In this case we might want to go a bit finer grained by > providing a snapshot for every query. Quite honestly, the implementation mechanism used by the other statistics views is enormous overkill. I agree with Robert that I'm not eager to duplicate that for the activity view, when a simple SRF can get the job done. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers