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.96) (envelope-from ) id 1wg5Iu-005uiD-2s for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Jul 2026 18:41:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wg5Ir-00AqHO-1X for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Jul 2026 18:41:25 +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.96) (envelope-from ) id 1wg5Ir-00AqHG-09 for pgsql-hackers@lists.postgresql.org; Sat, 04 Jul 2026 18:41:25 +0000 Received: from forwardcorp1b.mail.yandex.net ([2a02:6b8:c02:900:1:45:d181:df01]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wg5Io-00000001jkd-3jjk for pgsql-hackers@lists.postgresql.org; Sat, 04 Jul 2026 18:41:24 +0000 Received: from mail-nwsmtp-smtp-corp-main-34.sas.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-34.sas.yp-c.yandex.net [IPv6:2a02:6b8:c24:fa2:0:640:41ee:0]) by forwardcorp1b.mail.yandex.net (postfix) with ESMTPS id 32916807FE; Sat, 04 Jul 2026 21:41:19 +0300 (MSK) Received: from smtpclient.apple (unknown [2a02:6bf:8080:446::1:22]) by mail-nwsmtp-smtp-corp-main-34.sas.yp-c.yandex.net (smtpcorp) with ESMTPSA id HfnpYT1aAW20-erQSXahG; Sat, 04 Jul 2026 21:41:18 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1783190478; bh=xPb7bIyLf19u1FHzdElH8cWElRvd3tDfqVdQ98BDmEw=; h=Message-Id:To:Date:References:Cc:In-Reply-To:From:Subject; b=bu5jYxm7yrlU/qjK0ylUv+1O70YPrjqKtQmdqK4RP/9tNDm2/NJ0+1jNUNNimOuEF o/zrPFf54VyeJ5pKADsB3cI84YVHDG84aIxWr5w/m4wK3jlWD+n5soY87GSruildEC wT/zc+aOUeF/twsgQHoZAswMB/UjLXZ6QoJw5tfc= Authentication-Results: mail-nwsmtp-smtp-corp-main-34.sas.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Re: Missing FSM Update when Updating VM On-access From: Andrey Borodin In-Reply-To: Date: Sat, 4 Jul 2026 23:41:07 +0500 Cc: PostgreSQL Hackers , Andres Freund Content-Transfer-Encoding: quoted-printable Message-Id: <2B4BE330-EE88-4C90-93CC-AA75DD127BE8@yandex-team.ru> References: To: Melanie Plageman X-Mailer: Apple Mail (2.3864.600.51.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 30 Jun 2026, at 03:32, Melanie Plageman = wrote: >=20 > Hi Melanie, I applied the patch ("Update FSM after updating VM on-access") and it = does what it says. On a single node, on-access pruning now sets the VM and refreshes the FSM to the post-prune free space, matching what a plain = VACUUM records (in my run summed avail 3200000 -> 7360000, VM 10000|0). On a primary + streaming standby the FSM comes out identical on both sides = after replay (in this simple test) - i.e. the primary now records what the = standby already writes in heap_xlog_prune_freeze. A dedicated test would be nice but is difficult here: on-access = VM-setting is nondeterministic (see the enum/plancache flakiness earlier), and even a = TAP test with autovacuum off + forced horizon advancement would likely be unstable on the buildfarm - so it might even be net negative. One comment nit: the reserve behavior is preserved (we skip the FSM = update unless the page became newly_all_visible), but the outer comment = explaining *why* we don't update the FSM in the common case is gone; the rationale = now survives only as a parenthetical inside the `if = (presult.newly_all_visible)` block. A one-line note at the point where we *skip* the update would = spare a future reader from wondering why it isn't unconditional. Thanks for working on this! Best regards, Andrey Borodin.