aboutsummaryrefslogtreecommitdiff
path: root/src
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:26:33 -0400
commitac2063ade566deb03e72e3da52cf472e125708b7 (patch)
tree728ebcc8bcfed52dd6962b22c5076a0a88f82eb3 /src
parent3080bbaa919143e19dbe65fd0d81a1b4457c845d (diff)
downloadpostgresql-ac2063ade566deb03e72e3da52cf472e125708b7.tar.gz
postgresql-ac2063ade566deb03e72e3da52cf472e125708b7.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')
-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 a5e97c761da..f2f42659c14 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -2708,6 +2708,7 @@ MarkBufferDirtyHint(Buffer buffer, bool buffer_std)
if (dirtied)
{
VacuumPageDirty++;
+ pgBufferUsage.shared_blks_dirtied++;
if (VacuumCostActive)
VacuumCostBalance += VacuumCostPageDirty;
}