Location via proxy:
[ UP ]
[Report a bug]
[Manage cookies]
No cookies
No scripts
No ads
No referrer
Show this form
projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3080bba
)
Count buffers dirtied due to hints in pgBufferUsage.shared_blks_dirtied.
author
Robert Haas
<rhaas@postgresql.org>
Mon, 31 Mar 2014 17:06:26 +0000
(13:06 -0400)
committer
Robert Haas
<rhaas@postgresql.org>
Mon, 31 Mar 2014 17:26:33 +0000
(13:26 -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 a5e97c761da45e69d32473771608a027679fcf7b..f2f42659c14ace3e78893b85f496f15f71fddee5 100644
(file)
--- 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;
}