Re: BUG #17942: vacuumdb doesn't populate extended statistics on partitioned tables - Mailing list pgsql-bugs

From Kyotaro Horiguchi
Subject Re: BUG #17942: vacuumdb doesn't populate extended statistics on partitioned tables
Date
Msg-id 20230525.130759.1771148055252912581.horikyota.ntt@gmail.com
Whole thread Raw
In response to BUG #17942: vacuumdb doesn't populate extended statistics on partitioned tables  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17942: vacuumdb doesn't populate extended statistics on partitioned tables  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
At Wed, 24 May 2023 06:41:23 +0000, PG Bug reporting form <noreply@postgresql.org> wrote in 
> vacuumdb -Z -t people : -> ok extende stats collected
> vacuumdb -Z : -> no extended stats and analyze much faster

ANALYZE processes inhertance parents. By a quick search, I found that commit 3c3bb99330 modified get_rel_oids (which
hasnow been relocated to get_all_vacuum_rels) to include RELKIND_PARTITIONED_TABLE. However, it seems like it
overlookedupdating the same in vacuumdb.c. This dates back to 10.
 

diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c
index 4b17a07089..1369c37504 100644
--- a/src/bin/scripts/vacuumdb.c
+++ b/src/bin/scripts/vacuumdb.c
@@ -686,7 +686,8 @@ vacuum_one_database(ConnParams *cparams,
     {
         appendPQExpBufferStr(&catalog_query, " WHERE c.relkind OPERATOR(pg_catalog.=) ANY (array["
                              CppAsString2(RELKIND_RELATION) ", "
-                             CppAsString2(RELKIND_MATVIEW) "])\n");
+                             CppAsString2(RELKIND_MATVIEW) ", "
+                             CppAsString2(RELKIND_PARTITIONED_TABLE) "])\n");
         has_where = true;
     }

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-bugs by date:

Previous
From: Thomas Munro
Date:
Subject: Re: BUG #17943: Undefined symbol LLVMBuildGEP in llvmjit.so during pg_restore
Next
From: Hans Buschmann
Date:
Subject: AW: BUG #17943: Undefined symbol LLVMBuildGEP in llvmjit.so during pg_restore