projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c1797e
)
Count buffers dirtied due to hints in pgBufferUsage.shared_blks_dirtied.
author
Robert Haas
<
[email protected]
>
Mon, 31 Mar 2014 17:06:26 +0000
(13:06 -0400)
committer
Robert Haas
<
[email protected]
>
Mon, 31 Mar 2014 17:29:54 +0000
(13:29 -0400)
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
src/backend/storage/buffer/bufmgr.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/storage/buffer/bufmgr.c
b/src/backend/storage/buffer/bufmgr.c
index 9b0283fa518bdc1a28c30017143af01be1110eff..c60158d675f4cf16976fb3db1eac3545297c81fe 100644
(file)
--- a/
src/backend/storage/buffer/bufmgr.c
+++ b/
src/backend/storage/buffer/bufmgr.c
@@
-2474,6
+2474,7
@@
SetBufferCommitInfoNeedsSave(Buffer buffer)
{
/* Do vacuum cost accounting */
VacuumPageDirty++;
+ pgBufferUsage.shared_blks_dirtied++;
if (VacuumCostActive)
VacuumCostBalance += VacuumCostPageDirty;
}