aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/buffer/bufmgr.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2014-03-31 13:06:26 -0400
committerRobert Haas <rhaas@postgresql.org>2014-03-31 13:06:26 -0400
commit066254cea117a5a40d21401f754c83cc163378ae (patch)
tree6ee0b31dad79d0373914657e37f8cd42711255c5 /src/backend/storage/buffer/bufmgr.c
parent3f0e4be453ffd27b5f5e6c115172091abda3a38f (diff)
downloadpostgresql-066254cea117a5a40d21401f754c83cc163378ae.tar.gz
postgresql-066254cea117a5a40d21401f754c83cc163378ae.zip
Count buffers dirtied due to hints in pgBufferUsage.shared_blks_dirtied.
Previously, such buffers weren't counted, with the possible result that EXPLAIN (BUFFERS) and pg_stat_statements would understate the true number of blocks dirtied by an SQL statement. Back-patch to 9.2, where this counter was introduced. Amit Kapila
Diffstat (limited to 'src/backend/storage/buffer/bufmgr.c')
-rw-r--r--src/backend/storage/buffer/bufmgr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 19eecab4c28..4e46ddbba29 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -2707,6 +2707,7 @@ MarkBufferDirtyHint(Buffer buffer, bool buffer_std)
if (dirtied)
{
VacuumPageDirty++;
+ pgBufferUsage.shared_blks_dirtied++;
if (VacuumCostActive)
VacuumCostBalance += VacuumCostPageDirty;
}