0001-Rename-index_vacuum_count-to-index_vacuum_cycle_coun.patch

application/octet-stream

Filename: 0001-Rename-index_vacuum_count-to-index_vacuum_cycle_coun.patch
Type: application/octet-stream
Part: 2
Message: Re: Add index scan progress to pg_stat_progress_vacuum

Patch

Format: format-patch
Series: patch 0001
Subject: Rename "index_vacuum_count" to "index_vacuum_cycle_count" in in pg_stat_pogress_vacuum.
File+
doc/src/sgml/monitoring.sgml 1 1
src/backend/catalog/system_views.sql 1 1
src/test/regress/expected/rules.out 1 1
From f907d2e18743502a04e4c6ef878612cbcf99bf61 Mon Sep 17 00:00:00 2001
From: "Sami Imseih (AWS)" <simseih@amazon.com>
Date: Thu, 17 Feb 2022 13:39:38 +0000
Subject: [PATCH 1/1] Rename "index_vacuum_count" to "index_vacuum_cycle_count"
 in in pg_stat_pogress_vacuum.

Commit 76d8a1bfd5207d28a4e9fe98a0e1ea7c096d70aa introduces 2 new columns
to track index vacuum/cleanup progress. The columns have "index" in the
name. To make it clear what the existing "index_vacuum_count" column
refers to, which is the cycle count of the index vacuum, this change
renames the column to "index_vacuum_count"

Author: Sami Imseih, based on suggestions by Nathan Bossart, Peter Geoghegan and Masahiko Sawada
Reviewed by: Nathan Bossart, Justin Pryzby
Discussion: https://www.postgresql.org/message-id/flat/5478DFCD-2333-401A-B2F0-0D186AB09228@amazon.com
---
 doc/src/sgml/monitoring.sgml         | 2 +-
 src/backend/catalog/system_views.sql | 2 +-
 src/test/regress/expected/rules.out  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 04440dfa88..7bf31f9686 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -6252,7 +6252,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
 
      <row>
       <entry role="catalog_table_entry"><para role="column_definition">
-       <structfield>index_vacuum_count</structfield> <type>bigint</type>
+       <structfield>index_vacuum_cycle_count</structfield> <type>bigint</type>
       </para>
       <para>
        Number of completed index vacuum cycles.
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index 5bd6953996..0fa9c927e4 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -1127,7 +1127,7 @@ CREATE VIEW pg_stat_progress_vacuum AS
                       WHEN 8 THEN 'cleaning up indexes'
                       END AS phase,
         S.param2 AS heap_blks_total, S.param3 AS heap_blks_scanned,
-        S.param4 AS heap_blks_vacuumed, S.param5 AS index_vacuum_count,
+        S.param4 AS heap_blks_vacuumed, S.param5 AS index_vacuum_cycle_count,
         S.param6 AS max_dead_tuples, S.param7 AS num_dead_tuples,
         S.param8 AS indexes_total, S.param9 AS indexes_processed
     FROM pg_stat_get_progress_info('VACUUM') AS S
diff --git a/src/test/regress/expected/rules.out b/src/test/regress/expected/rules.out
index c230c6a441..c08bcb8e74 100644
--- a/src/test/regress/expected/rules.out
+++ b/src/test/regress/expected/rules.out
@@ -2002,7 +2002,7 @@ pg_stat_progress_vacuum| SELECT s.pid,
     s.param2 AS heap_blks_total,
     s.param3 AS heap_blks_scanned,
     s.param4 AS heap_blks_vacuumed,
-    s.param5 AS index_vacuum_count,
+    s.param5 AS index_vacuum_cycle_count,
     s.param6 AS max_dead_tuples,
     s.param7 AS num_dead_tuples,
     s.param8 AS indexes_total,
-- 
2.32.0