Re: BUG #17942: vacuumdb doesn't populate extended statistics on partitioned tables

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: henri(dot)chapelle(at)dbandmore(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17942: vacuumdb doesn't populate extended statistics on partitioned tables
Date: 2023-05-25 04:07:59
Message-ID: 20230525.130759.1771148055252912581.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

At Wed, 24 May 2023 06:41:23 +0000, PG Bug reporting form <noreply(at)postgresql(dot)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 has now been relocated to get_all_vacuum_rels) to include RELKIND_PARTITIONED_TABLE. However, it seems like it overlooked updating 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Hans Buschmann 2023-05-25 07:12:40 AW: BUG #17943: Undefined symbol LLVMBuildGEP in llvmjit.so during pg_restore
Previous Message Thomas Munro 2023-05-25 03:20:44 Re: BUG #17943: Undefined symbol LLVMBuildGEP in llvmjit.so during pg_restore