pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Masahiko Sawada <msawada@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use pgBufferUsage for buffer usage tracking in analyze.
Date: Wed, 14 Aug 2024 01:50:03 +0000
Message-ID: <E1se39H-0044Ac-Nn@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c584781bcc686ebc0b3139e3e166607537336f69

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c  | 22 ++++++++++++++-----
src/backend/commands/analyze.c        | 41 +++++++++++++++++++----------------
src/backend/commands/vacuum.c         |  3 ---
src/backend/commands/vacuumparallel.c |  3 ---
src/backend/storage/buffer/bufmgr.c   |  4 ----
src/backend/utils/init/globals.c      |  4 ----
src/include/miscadmin.h               |  4 ----
7 files changed, 38 insertions(+), 43 deletions(-)



Message-ID: <E1se39H-0044Ac-Nn@gemulon.postgresql.org>
Permalink:  ../E1se39H-0044Ac-Nn@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1se39H-0044Ac-Nn@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: msawada@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Use pgBufferUsage for buffer usage tracking in analyze.
  In-Reply-To: <E1se39H-0044Ac-Nn@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox