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
This commit is contained in:
parent
3080bbaa91
commit
ac2063ade5
@ -2708,6 +2708,7 @@ MarkBufferDirtyHint(Buffer buffer, bool buffer_std)
|
|||||||
if (dirtied)
|
if (dirtied)
|
||||||
{
|
{
|
||||||
VacuumPageDirty++;
|
VacuumPageDirty++;
|
||||||
|
pgBufferUsage.shared_blks_dirtied++;
|
||||||
if (VacuumCostActive)
|
if (VacuumCostActive)
|
||||||
VacuumCostBalance += VacuumCostPageDirty;
|
VacuumCostBalance += VacuumCostPageDirty;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user