Re: Autovacuum on partitioned table (autoanalyze)

From: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, yuzuko <yuzukohosoya(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, David Steele <david(at)pgmasters(dot)net>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Amit Langote <amitlangote09(at)gmail(dot)com>, Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Greg Stark <stark(at)mit(dot)edu>
Subject: Re: Autovacuum on partitioned table (autoanalyze)
Date: 2021-08-28 20:03:41
Message-ID: 202108282003.eg6peb4cwqp3@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Aug-17, Justin Pryzby wrote:

> I suggest the attached (which partially reverts the revert), to allow showing
> correct data for analyze_count and last_analyzed.

Yeah, that makes sense and my keeping of the pg_stat_all_tables entries
seems pretty useless without this change. I have pushed a slightly
modified version of this to 14 and master.

> Arguably these should be reported as null in v14 for partitioned tables, since
> they're not "known to be zero", but rather "currently unpopulated".
>
> n_mod_since_analyze | 0
> n_ins_since_vacuum | 0

I don't disagree, but it's not easy to implement this at present. I
think almost all counters should be nulls for partitioned tables. For
some of them one could make a case that it'd be more convenient to
propagate numbers up from partitions.

--
Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-08-28 22:26:21 Re: Can we get rid of repeated queries from pg_dump?
Previous Message Daniel Gustafsson 2021-08-28 19:57:51 Re: pg_receivewal: remove extra conn = NULL; in StreamLog