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 1tWGLz-00FMiG-FV for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jan 2025 14:51:15 +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 1tWGLy-00H94w-93 for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Jan 2025 14:51:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tWGLx-00H94n-Vx for pgsql-hackers@lists.postgresql.org; Fri, 10 Jan 2025 14:51:13 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tWGLu-000vGY-1T for pgsql-hackers@postgresql.org; Fri, 10 Jan 2025 14:51:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1736520670; bh=M+QVe9Lns4eGpGgmJNPOIGKAmsbz80W/Ssnm4TaHdY4=; h=Message-ID:Date:User-Agent:Subject:From:To:Cc:References: In-Reply-To:From; b=GQ6l3wsvnxL2pWNvKXhuGBNCZIvt8YuQbPKfBut9iBuuefOZmHYfKeqSL1jgxvm6p cOHBv3nqNf2TU7MnkzMm+1KL/hh/WrkKTYR95kAWx0fHhpEUU5XMD9vFkAuf/prwA8 8S6sG6JQu02nSOczMLF7Rw1/RLodBtFCowKYaynHTFmIbvA8FVpAwvkDzy9WFLJNTr BVhEoWEJRMmfLP5bQYNOZTpjYk80OAjZVgct0agbShBULeUbMac7LJYvI1TQE3LnhC adm0ATMQzXlYoGQZPBjuWOuhEPTfoPV4fMRxQ0ZR1eOw9RwPY7J2fokvjen3xm8cMn TRQGO5hGNw3uA== Received: from [10.4.12.74] (unknown [93.174.131.141]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: a.rybakina@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 6470F602AF; Fri, 10 Jan 2025 17:51:10 +0300 (MSK) Content-Type: multipart/alternative; boundary="------------A8oYpH8FsxdmbAx6P001H3OZ" Message-ID: Date: Fri, 10 Jan 2025 17:51:10 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Vacuum statistics From: Alena Rybakina To: Alexander Korotkov Cc: Jim Nasby , Andrei Zubkov , Masahiko Sawada , Melanie Plageman , jian he , pgsql-hackers , a.lepikhov@postgrespro.ru References: <9b10c6d3-52c4-4eef-b67c-c33442667729@postgrespro.ru> <9485d892-fd04-4e3a-ac24-7dd767cb7333@postgrespro.ru> <0B6CBF4C-CC2A-4200-9126-CE3A390D938B@upgrade.com> <6732acf8ce0f31025b535ae1a64568750924a887.camel@moonset.ru> <5AA8FFD5-6DE2-4A31-8E00-AE98F738F5D1@upgrade.com> <85b963fe-5977-43aa-9241-75b862abcc69@postgrespro.ru> <9C7A167C-DCDE-4A17-9ABE-6276723FEC50@upgrade.com> <2d493cf9-9ba7-4cc1-a3f2-67afd7c163ee@postgrespro.ru> <30d54302-9e9c-4e04-819e-a13b679cdcc8@postgrespro.ru> Content-Language: en-US In-Reply-To: <30d54302-9e9c-4e04-819e-a13b679cdcc8@postgrespro.ru> X-KSMG-AntiPhishing: NotDetected X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2025/01/10 08:29:00 #26967733 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------A8oYpH8FsxdmbAx6P001H3OZ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi! I thought about this problem again and I think I have a solution. On 02.12.2024 23:12, Alena Rybakina wrote: >> * I've read the previous discussion on how important to keep all these >> fields regarding vacuum statistics including points by Andrei and Jim. >> It still worrying me that statistics volume is going to burst in about >> 3 times, but I don't have a particular proposal on how to make more >> granular approach. I wonder if you could propose something. We can collect statistics on databases at all times - there are less compared to vacuum statistics of relations, but they can give enough information that can hint that something is going wrong. With the track_vacuum_statistics guc we can cover cases of collecting extended and complete information: when it is enabled, we will collect vacuum statistics on relations both: heaps and indexes. This will not lead to a synchronicity between constant database statistics and temporary statistics of relations, since our vacuum statistics are cumulative and it is assumed that we will look at changes in statistics over a certain period. What do you think? -- Regards, Alena Rybakina Postgres Professional --------------A8oYpH8FsxdmbAx6P001H3OZ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hi! I thought about this problem again and I think I have a solution.

On 02.12.2024 23:12, Alena Rybakina wrote:
* I've read the previous discussion on how important to keep all these
fields regarding vacuum statistics including points by Andrei and Jim.
It still worrying me that statistics volume is going to burst in about
3 times, but I don't have a particular proposal on how to make more
granular approach.  I wonder if you could propose something.
We can collect statistics on databases at all times - there are less compared to vacuum statistics of relations, but they can give enough information that can hint that something is going wrong.
With the track_vacuum_statistics guc we can cover cases of collecting extended and complete information: when it is enabled, we will collect vacuum statistics on relations both: heaps and indexes.
This will not lead to a synchronicity between constant database statistics and temporary statistics of relations, since our vacuum statistics are cumulative and it is assumed that we will look at changes in statistics over a certain period.
What do you think?
-- 
Regards,
Alena Rybakina
Postgres Professional
--------------A8oYpH8FsxdmbAx6P001H3OZ--