pgsql: Avoid updating our PgBackendStatus entry when track_activities i

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid updating our PgBackendStatus entry when track_activities i
Date: 2013-04-03 18:13:54
Message-ID: E1UNSC2-0003jQ-BA@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid updating our PgBackendStatus entry when track_activities is off.

The point of turning off track_activities is to avoid this reporting
overhead, but a thinko in commit 4f42b546fd87a80be30c53a0f2c897acb826ad52
caused pgstat_report_activity() to perform half of its updates anyway.
Fix that, and also make sure that we clear all the now-disabled fields
when transitioning to the non-reporting state.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/a0c2492b957a7e89b997d03d0d62f37fee7aafdf

Modified Files
--------------
src/backend/postmaster/pgstat.c | 42 +++++++++++++++++++---------------
src/backend/utils/adt/pgstatfuncs.c | 11 +-------
2 files changed, 25 insertions(+), 28 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message pgsql 2013-04-04 13:55:36 pgsql: Tag refs/tags/REL8_4_17 was created
Previous Message Tom Lane 2013-04-03 14:26:23 pgsql: Fix typo in FDW docs.