Skip to content
Snippets Groups Projects
Commit 6a63dda4 authored by Robert Haas's avatar Robert Haas
Browse files

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
parent 8c1797e5
No related branches found
Tags
No related merge requests found
......@@ -2474,6 +2474,7 @@ SetBufferCommitInfoNeedsSave(Buffer buffer)
{
/* Do vacuum cost accounting */
VacuumPageDirty++;
pgBufferUsage.shared_blks_dirtied++;
if (VacuumCostActive)
VacuumCostBalance += VacuumCostPageDirty;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment