v4-0001-doc-Note-that-anti-wraparound-autovacuum-skips-AN.patch

application/octet-stream

Filename: v4-0001-doc-Note-that-anti-wraparound-autovacuum-skips-AN.patch
Type: application/octet-stream
Part: 0
Message: Re: remove autoanalyze corner case
From 3b1599340727de0beb0d2a80d4fa7826c1f7d1da Mon Sep 17 00:00:00 2001
From: Shinya Kato <shinya11.kato@gmail.com>
Date: Mon, 25 May 2026 17:05:50 +0900
Subject: [PATCH v4] doc: Note that anti-wraparound autovacuum skips ANALYZE

Commit e3481edfd1b removed a corner case in which autoanalyze could
run on a table whose autovacuum_enabled reloption is false when an
anti-wraparound vacuum was forced.  As a result, a table for which
autovacuum is disabled is now only ever VACUUMed, never ANALYZEd, by
such forced runs.

Document this behavior so it is explicit, both in the routine
vacuuming discussion and in the description of the
autovacuum_enabled storage parameter.

Author: Shinya Kato <shinya11.kato@gmail.com>
Reviewed-by: Sami Imseih <samimseih@gmail.com>
Discussion: https://postgr.es/m/CAOzEurT6RJdEErH9%3D8jugMy5UMak1ZPJdY4xQ1pWS4VDwuoraQ%40mail.gmail.com
---
 doc/src/sgml/maintenance.sgml      | 3 ++-
 doc/src/sgml/ref/create_table.sgml | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml
index 4a21bdb5de7..896e1387bc3 100644
--- a/doc/src/sgml/maintenance.sgml
+++ b/doc/src/sgml/maintenance.sgml
@@ -531,7 +531,8 @@
     autovacuum is invoked on any table that might contain unfrozen rows with
     XIDs older than the age specified by the configuration parameter <xref
     linkend="guc-autovacuum-freeze-max-age"/>.  (This will happen even if
-    autovacuum is disabled.)
+    autovacuum is disabled.  In that case, only <command>VACUUM</command> is
+    performed; <command>ANALYZE</command> is skipped.)
    </para>
 
    <para>
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml
index e342585c7f0..95a23ccb0b9 100644
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@ -1683,7 +1683,9 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
      and/or <command>ANALYZE</command> operations on this table following the rules
      discussed in <xref linkend="autovacuum"/>.
      If false, this table will not be autovacuumed, except to prevent
-     transaction ID wraparound. See <xref linkend="vacuum-for-wraparound"/> for
+     transaction ID wraparound.  In that case, only <command>VACUUM</command>
+     is performed; <command>ANALYZE</command> is skipped.
+     See <xref linkend="vacuum-for-wraparound"/> for
      more about wraparound prevention.
      Note that the autovacuum daemon does not run at all (except to prevent
      transaction ID wraparound) if the <xref linkend="guc-autovacuum"/>
-- 
2.47.3