The point of turning off pgstat_track_activities is, IMO, to eliminate the overhead of updating one's PgBackendStatus entry in main memory. Commit 4f42b546 broke this, however, because it confused getting into the "reporting disabled" state with what should happen once already in the state. If you try turning off track_activities in a backend, you'll find that you can't see its current query any more, but that's not because it's not reporting it --- it's only because pg_stat_get_activity() is hiding it from you. The overhead is still being paid, as you can confirm by noting that query_start and state_change continue to update whenever the backend does something.
Will fix. 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