]> granicus.if.org Git - postgresql/commit
Smooth reporting of commit/rollback statistics.
authorKevin Grittner <kgrittn@postgresql.org>
Wed, 2 Jul 2014 20:03:57 +0000 (15:03 -0500)
committerKevin Grittner <kgrittn@postgresql.org>
Wed, 2 Jul 2014 20:03:57 +0000 (15:03 -0500)
commit93787ce7477b0d718bdcdb88605725792f36697e
tree45c1be6f27afbc98c8fcd41ee768c8ffa8ad4620
parentb446a384b7c231e3fa10dfb0fbc9247a6b329348
Smooth reporting of commit/rollback statistics.

If a connection committed or rolled back any transactions within a
PGSTAT_STAT_INTERVAL pacing interval without accessing any tables,
the reporting of those statistics would be held up until the
connection closed or until it ended a PGSTAT_STAT_INTERVAL interval
in which it had accessed a table.  This could result in under-
reporting of transactions for an extended period, followed by a
spike in reported transactions.

While this is arguably a bug, the impact is minimal, primarily
affecting, and being affected by, monitoring software.  It might
cause more confusion than benefit to change the existing behavior
in released stable branches, so apply only to master and the 9.4
beta.

Gurjeet Singh, with review and editing by Kevin Grittner,
incorporating suggested changes from Abhijit Menon-Sen and Tom
Lane.
src/backend/postmaster/pgstat.c