track_activities is mostly broken

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: track_activities is mostly broken
Date: 2013-04-03 16:00:02
Message-ID: 15861.1365004802@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2013-04-03 16:01:15 Re: CREATE EXTENSION BLOCKS
Previous Message Pavel Stehule 2013-04-03 15:58:57 Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)