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 1ql9rn-001VzG-34 for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Sep 2023 15:20:51 +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 1ql9rl-00CrLI-OY for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Sep 2023 15:20:49 +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 1ql9qs-00CoYj-AI for pgsql-hackers@lists.postgresql.org; Tue, 26 Sep 2023 15:19:54 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ql9qo-007hgU-K7 for pgsql-hackers@postgresql.org; Tue, 26 Sep 2023 15:19:52 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D6BC33200994; Tue, 26 Sep 2023 11:19:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 26 Sep 2023 11:19:47 -0400 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:sender:subject:subject:to:to; s=fm2; t= 1695741586; x=1695827986; bh=E1AGmK6IYWDxWCluFZfpouRLa53V2bJ4++J hsB+l7XM=; b=CSz7fZOkwBNbuFH1rf0oX2IRbp8iFXuA918eYwtruz9uzwz+iRb RE6f8szog8FfJgWIn+szyzr2VsOQlj/IEv7DjiyQsGbRjDezNQF71V5UoqtbkYo0 QlhwXpZz/YlDB4CPWfLHdNbOopK0KOLqLJi5VljxXD9Pr/kEH9uL19VqSulLQnEp Rr/OX0qMuKqpYTRMW9kG++eqzYTu4HMXKSWQ0sS0HqTrTGzuNBu5wrkHS1E8o7pF qb6k3p2ozZ93mxGz8KAXlh+iuQBZQ6fCiAW8b6U4VWlFGBGdJ5s+i/ntjt7ssRXr ybj1840K9qBP7h8F7WmNFRzDd5Iw7X62ltg== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1695741586; x=1695827986; bh=E1AGmK6IYWDxWCluFZfpouRLa53V2bJ4++J hsB+l7XM=; b=LjJFyaRoj+401/v3auZCNdbF5AWAty8iKVJ0UvHndQjWER929uJ +N/O3w3uXKX4RqBW1OMbAyYdOWkj9S0iDB9Bl2t45Hb3V/GTyI9CzxBctdYfuQCa +bAgT9w7ASIjejpdUUPuOlg+UmMaOUdClMsM92C0l6kdLBWFHdhFathnkYK63tVa xtchfct8TLWv3KysfSMxBUIhZ79orAr2YWFKYskL9BkWfSJ3vVryj2KRL4KcMUaI zF2sOCxS0dg2SdbzmuqtxiMjzWc6zokcJ0FmPnqNxFY89ULa8t/lX9KXQ/+VKla6 KF0AXOIbhc8dF1xQFaqOnUQr+vMiIrgiQgQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvjedrtddtgdehkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtugfgjgesthekredttddtjeenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhephfeitefgleevtedtffejvedujeekjedugfdtveffjeelvddtfeekgefg jefhgfegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 Sep 2023 11:19:45 -0400 (EDT) Date: Tue, 26 Sep 2023 08:19:43 -0700 From: Andres Freund To: Peter Geoghegan Cc: Robert Haas , Melanie Plageman , Pg Hackers , Jeff Davis Subject: Re: Eager page freeze criteria clarification Message-ID: <20230926151943.gn4itbeckwfpbbsw@alap3.anarazel.de> References: <20230906050900.ig5d55fpiwsjqtil@awork3.anarazel.de> <20230908040713.qlc4sojzjd4amqt4@awork3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-09-25 14:16:46 -0700, Peter Geoghegan wrote: > On Mon, Sep 25, 2023 at 11:45 AM Robert Haas wrote: > I'm surprised that there hasn't been any discussion of the absolute > amount of system-wide freeze debt on this thread. If 90% of the pages > in the entire database are frozen, it'll generally be okay if we make > the wrong call by freezing lazily when we shouldn't. This is doubly > true within small to medium sized tables, where the cost of catching > up on freezing cannot ever be too bad (concentrations of unfrozen > pages in one big table are what really hurt users). I generally agree with the idea of using "freeze debt" as an input - IIRC I proposed using the number of frozen pages vs number of pages as the input to the heuristic in one of the other threads about the topic a while back. I also think we should read a portion of all-visible-but-not-frozen pages during non-aggressive vacuums to manage the freeze debt. However, I'm not at all convinced doing this on a system wide level is a good idea. Databases do often contain multiple types of workloads at the same time. E.g., we want to freeze aggressively in a database that has the bulk of its size in archival partitions but has lots of unfrozen data in an active partition. And databases have often loads of data that's going to change frequently / isn't long lived, and we don't want to super aggressively freeze that, just because it's a large portion of the data. Greetings, Andres Freund