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 1utapO-00Ae5P-K0 for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Sep 2025 23:54:19 +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 1utapM-0065x6-Kn for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Sep 2025 23:54:17 +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 1utapL-0065wG-LA for pgsql-hackers@lists.postgresql.org; Tue, 02 Sep 2025 23:54:16 +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 1utapG-000FlO-2l for pgsql-hackers@lists.postgresql.org; Tue, 02 Sep 2025 23:54:15 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id 5D2DB7A02C3; Tue, 2 Sep 2025 19:54:09 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Tue, 02 Sep 2025 19:54:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc: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=1756857249; x=1756943649; bh=iS3fL6crqI xeCgvY5K1p9qeYE4mDSmZW7LNtL6YoyQw=; b=SsNYNGFHWuDEmo7KIHJfkhwat6 /WwLwA3w86IeJSKOJx/f0Zv+gvuMNbXSHWSIoGtBf9gHPD9Q7ZEvbUbQyWiHyt0z 40e4k0k5yAxxn3+8gydzkC1WNdXuG+oGCL08dQbVEeK9cS1Gh+VeeDYGKltacYYV Wml36bj0J0Ky+3gu5NV7zE1xgVPPPB1E9e0V6pEWYWk5Ot0Lww2GoS9mHVG2XCO4 9ahJbldvHqgmLfms9NKJmZZOFUNMdXHXln8+Zgu8p44FZ2gUR93BTrZt1TIiQZ5o MbkodWTrFxGgtvvuacFVzYMAM/pagPLgo6C6CBE0IvfooHOsmYNV9LV7Vt0g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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= 1756857249; x=1756943649; bh=iS3fL6crqIxeCgvY5K1p9qeYE4mDSmZW7LN tL6YoyQw=; b=eC8nmoSToceIJRJpjjKR7jHaNOXfGJBS4jRnAsMApWNVA9A/v/R nvUNHi8vZs5sLX7sCxZeJ07plm47gyhQBVOhs5BDGwKsRaxypISBAV8uApNL9sIr KAiLwjG9dT9y9pwKOunTx+zM4DtovQt/m2g3wmQe5LEVQgBIsOuPqyXbFc7lMaZ9 k1MKh17ZmX1ZD/5g8A8Vc3thXimSp0SXrp7xLQ8hIy1HGHs3+9sdsNWDsms8oVtH K35gAG7FsWqFSDe4Gc3kEUKNMGeWaWrknKRg870YxdK0LArzP/5pR/W/BIn01aVo LFaMCeUSJrjKhOs9iZB/nnjNnjkBIKx7NpA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epfffhvfevuffkfhggtggujgesthdtsfdttddtvdenucfhrhhomheptehnughrvghsucfh rhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrthhtvg hrnhepgedtveeifeehjeefveelgeehgeeigeffiefhgfekleethfehueekueefleeguddu necuffhomhgrihhnpehpohhsthhgrhdrvghsnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdruggvpdhn sggprhgtphhtthhopeeipdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehmvghlrg hnihgvphhlrghgvghmrghnsehgmhgrihhlrdgtohhmpdhrtghpthhtoheprhgvshhhkhgv khhirhhilhhlsehgmhgrihhlrdgtohhmpdhrtghpthhtoheprhhosggvrhhtmhhhrggrsh esghhmrghilhdrtghomhdprhgtphhtthhopehhlhhinhhnrghkrgesihhkihdrfhhipdhr tghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqh hlrdhorhhgpdhrtghpthhtohepgiegmhhmmheshigrnhguvgigqdhtvggrmhdrrhhu X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 Sep 2025 19:54:08 -0400 (EDT) Date: Tue, 2 Sep 2025 19:54:07 -0400 From: Andres Freund To: Melanie Plageman Cc: Kirill Reshke , Andrey Borodin , PostgreSQL Hackers , Robert Haas , Heikki Linnakangas Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access) Message-ID: References: <87DD95AA-274F-4F4F-BAD9-7738E5B1F905@yandex-team.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2025-09-02 19:11:01 -0400, Melanie Plageman wrote: > From dd98177294011ee93cac122405516abd89f4e393 Mon Sep 17 00:00:00 2001 > From: Melanie Plageman > Date: Wed, 27 Aug 2025 08:50:15 -0400 > Subject: [PATCH v8 01/22] Remove unneeded VM pin from VM replay LGTM. > From 7c5cb3edf89735eaa8bee9ca46111bd6c554720b Mon Sep 17 00:00:00 2001 > From: Melanie Plageman > Date: Wed, 27 Aug 2025 10:07:29 -0400 > Subject: [PATCH v8 02/22] Add assert and log message to visibilitymap_set LGTM. > From 07f31099754636ec9dabf6cca06c33c4b19c230c Mon Sep 17 00:00:00 2001 > From: Melanie Plageman > Date: Tue, 17 Jun 2025 17:22:10 -0400 > Subject: [PATCH v8 03/22] Eliminate xl_heap_visible in COPY FREEZE > > Instead of emitting a separate WAL record for setting the VM bits in > xl_heap_visible, specify the changes to make to the VM block in the > xl_heap_multi_insert record instead. > > Author: Melanie Plageman > Reviewed-by: Kirill Reshke > Discussion: https://postgr.es/m/flat/CAAKRu_ZMw6Npd_qm2KM%2BFwQ3cMOMx1Dh3VMhp8-V7SOLxdK9-g%40mail.gmail.com > + /* > + * If we're only adding already frozen rows to a previously empty > + * page, mark it as all-frozen and update the visibility map. We're > + * already holding a pin on the vmbuffer. > + */ > else if (all_frozen_set) > + { > + Assert(visibilitymap_pin_ok(BufferGetBlockNumber(buffer), vmbuffer)); > PageSetAllVisible(page); > + LockBuffer(vmbuffer, BUFFER_LOCK_EXCLUSIVE); > + visibilitymap_set_vmbyte(relation, > + BufferGetBlockNumber(buffer), > + vmbuffer, > + VISIBILITYMAP_ALL_VISIBLE | > + VISIBILITYMAP_ALL_FROZEN); > + }