Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ac2063a

Browse files
committed
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
1 parent 3080bba commit ac2063a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/backend/storage/buffer/bufmgr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2708,6 +2708,7 @@ MarkBufferDirtyHint(Buffer buffer, bool buffer_std)
27082708
if (dirtied)
27092709
{
27102710
VacuumPageDirty++;
2711+
pgBufferUsage.shared_blks_dirtied++;
27112712
if (VacuumCostActive)
27122713
VacuumCostBalance += VacuumCostPageDirty;
27132714
}

0 commit comments

Comments
 (0)