From c584781bcc686ebc0b3139e3e166607537336f69 Mon Sep 17 00:00:00 2001 From: Masahiko Sawada Date: Tue, 13 Aug 2024 18:49:45 -0700 Subject: Use pgBufferUsage for buffer usage tracking in analyze. Previously, (auto)analyze used global variables VacuumPageHit, VacuumPageMiss, and VacuumPageDirty to track buffer usage. However, pgBufferUsage provides a more generic way to track buffer usage with support functions. This change replaces those global variables with pgBufferUsage in analyze. Since analyze was the sole user of those variables, it removes their declarations. Vacuum previously used those variables but replaced them with pgBufferUsage as part of a bug fix, commit 5cd72cc0c. Additionally, it adjusts the buffer usage message in both vacuum and analyze for better consistency. Author: Anthonin Bonnefoy Reviewed-by: Masahiko Sawada, Michael Paquier Discussion: https://postgr.es/m/CAO6_Xqr__kTTCLkftqS0qSCm-J7_xbRG3Ge2rWhucxQJMJhcRA%40mail.gmail.com --- src/include/miscadmin.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/include/miscadmin.h') diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index ac16233b71f..25348e71eb9 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -284,10 +284,6 @@ extern PGDLLIMPORT int VacuumCostPageDirty; extern PGDLLIMPORT int VacuumCostLimit; extern PGDLLIMPORT double VacuumCostDelay; -extern PGDLLIMPORT int64 VacuumPageHit; -extern PGDLLIMPORT int64 VacuumPageMiss; -extern PGDLLIMPORT int64 VacuumPageDirty; - extern PGDLLIMPORT int VacuumCostBalance; extern PGDLLIMPORT bool VacuumCostActive; -- cgit v1.2.3