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 1tp8zt-00122R-CU for pgsql-committers@arkaria.postgresql.org; Mon, 03 Mar 2025 16:50:29 +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 1tp8zs-00Bocl-59 for pgsql-committers@arkaria.postgresql.org; Mon, 03 Mar 2025 16:50:28 +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 1tp8zr-00Bobr-Tm for pgsql-committers@lists.postgresql.org; Mon, 03 Mar 2025 16:50:27 +0000 Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tp8zo-000jsY-12 for pgsql-committers@lists.postgresql.org; Mon, 03 Mar 2025 16:50:27 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id 1ACF925401CE; Mon, 3 Mar 2025 11:50:23 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 03 Mar 2025 11:50:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1741020622; x=1741107022; bh=YLf2mE7E2xvWAhcoPe9ifK8KWDQMGO8ruwHSiFnJJgg=; b= U9eOYIWlU4Gk3wC9oIPRj6BE/cK9oexuVy07tCWjpLJsFiXFS5ursvcCaQAj7vaA +ufREM1K1/9H/RKGxRN3F8lCnkJqNyrUgD42SPi64t95XzD0h1DhhbiBQxO8IvJh nHDcTFrF+jSnlr0KneOSuxSEekd4BpF/31ViWQ6H6/bw2VbM6W2Aeccz7k/FZPpc PredQga/5ABH4x+BV+jlan4r5Jk1fyYd6cZL0ObjqqRKxHcLbj1qulp+Lz3X6KQW 2YLEAWyA4rAuYdspSWUk4fbVuLqZScYh6VK5TeivQOCRevwDvcTkgu/lfzJfMdY8 YcYUA0lOZ1dS9VTCg+cIPA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1741020622; x= 1741107022; bh=YLf2mE7E2xvWAhcoPe9ifK8KWDQMGO8ruwHSiFnJJgg=; b=L XwrjSIr7LYOW1FmYpvqEwPm4vpfCDFSubhgWO6fh6r9djT3cEoMRriwDtKzQMtGL JR9Krb/oLudZYjmaAIENtVb0JtJZH7GsYQmPIX3RROUoGDTpOGxSgm3VjuYpPbYv e5UkmMwJFhsHtw5iUaPyvp8aYhqDgB1DcL7MZe1veJhkdKAJD+NccDXAA1dCC7q7 jNCsAL5WHDkDU5cxnrwWHgWugrT7SRmcL4qOYTMAeCGinqUeiKFhw+Sr2PDnopIQ fHXlx/HpDNxeXtYH1p/bNNIKfe0sD4ijDK8GgB/z1Hbm9GHYo4Bu1EjR1HxS65St ShPfPBZPYiAE7croq7B6A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdelleeigecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfhfgggtugfgjgestheksfdttddt udenucfhrhhomheptehnughrvghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrg iivghlrdguvgeqnecuggftrfgrthhtvghrnhephedvfeffudejveelgfehkeeuueeuvefg tefhiedvffekueefheeuueefieetueegnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdruggvpdhnsggp rhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrlhhvhhgvrh hrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhrtghpthhtohepmhgvlhgrnhhivghplhgr ghgvmhgrnhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdgtohhmmhhith htvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 Mar 2025 11:50:22 -0500 (EST) Date: Mon, 3 Mar 2025 11:50:21 -0500 From: Andres Freund To: =?utf-8?Q?=C3=81lvaro?= Herrera Cc: Melanie Plageman , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Add relallfrozen to pg_class Message-ID: References: <202503031644.nihftaytey2b@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202503031644.nihftaytey2b@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2025-03-03 17:44:54 +0100, Álvaro Herrera wrote: > On 2025-Mar-03, Melanie Plageman wrote: > > > Add relallfrozen to pg_class > > > > Add relallfrozen, an estimate of the number of pages marked all-frozen > > in the visibility map. > > > > pg_class already has relallvisible, an estimate of the number of pages > > in the relation marked all-visible in the visibility map. This is used > > primarily for planning. > > > > relallfrozen, together with relallvisible, is useful for estimating the > > outstanding number of all-visible but not all-frozen pages in the > > relation for the purposes of scheduling manual VACUUMs and tuning vacuum > > freeze parameters. > > I'm confused about this. Why was the new value added to pg_class > instead of to the pgstat system? I don't think relallvisible is a good > precedent, because as you write here, that one is used for planning, > which has different requirements. For vacuuming metrics we rely on > pgstat. We do so because updating the other stats would cause too much churn - the number of dead tuples etc changes rather rapidly. That's not the case here. Having reliable information after a crash (where we loose pgstats) that 95% of the table is actually frozen, rather than not seems good. Greetings, Andres Freund