Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1scruG-00B23H-Gs for pgsql-hackers@arkaria.postgresql.org; Sat, 10 Aug 2024 19:37:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1scruD-00AFFV-QG for pgsql-hackers@arkaria.postgresql.org; Sat, 10 Aug 2024 19:37:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1scruD-00AFFL-GA for pgsql-hackers@lists.postgresql.org; Sat, 10 Aug 2024 19:37:37 +0000 Received: from relay161.nicmail.ru ([91.189.117.5]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1scru6-0045G6-3z for pgsql-hackers@postgresql.org; Sat, 10 Aug 2024 19:37:35 +0000 Received: from [10.28.138.151] (port=47760 helo=localhost) by relay.hosting.mail.nic.ru with esmtp (Exim 5.55) (envelope-from ) id 1scru2-000000001qi-3zML; Sat, 10 Aug 2024 22:37:27 +0300 Received: from [78.107.250.17] (account zubkov@moonset.ru HELO localhost) by incarp1103.mail.hosting.nic.ru (Exim 5.55) with id 1scru2-008zvq-2h; Sat, 10 Aug 2024 22:37:26 +0300 Received: from [192.168.88.17] by localhost with esmtp (Exim 4.94.2) (envelope-from ) id 1scru2-004NqH-3J; Sat, 10 Aug 2024 22:37:26 +0300 Message-ID: Subject: Re: Vacuum statistics From: Andrei Zubkov To: Ilia Evdokimov , Alena Rybakina Cc: pgsql-hackers , a.lepikhov@postgrespro.ru Date: Sat, 10 Aug 2024 22:37:25 +0300 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-MS-Exchange-Organization-SCL: -1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, Ilia! > Do you consider not to create new table in pg_catalog but to save=20 > statistics in existing table? I mean pg_class or=20 > pg_stat_progress_analyze, pg_stat_progress_vacuum? >=20 Thank you for your interest on our patch! *_progress views is not our case. They hold online statistics while vacuum is in progress. Once work is done on a table the entry is gone from those views. Idea of this patch is the opposite - it doesn't provide online statistics but it accumulates statistics about rosources consumed by all vacuum passes over all relations. It's much closer to the pg_stat_all_tables than pg_stat_progress_vacuum. It seems pg_class is not the right place because it is not a statistic view - it holds the current relation state and haven't anything about the relation workload. Maybe the pg_stat_all_tables is the right place but I have several thoughts about why it is not: - Some statistics provided by this patch is really vacuum specific. I don't think we want them in the relation statistics view. - Postgres is extreamly extensible. I'm sure someday there will be table AMs that does not need the vacuum at all. Right now vacuum specific workload views seems optimal choice to me. Regards, --=20 Andrei Zubkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company