Skip to content

Commit 6a63dda

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 8c1797e commit 6a63dda

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
@@ -2474,6 +2474,7 @@ SetBufferCommitInfoNeedsSave(Buffer buffer)
24742474
{
24752475
/* Do vacuum cost accounting */
24762476
VacuumPageDirty++;
2477+
pgBufferUsage.shared_blks_dirtied++;
24772478
if (VacuumCostActive)
24782479
VacuumCostBalance += VacuumCostPageDirty;
24792480
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy