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 1whCuK-0004oD-28 for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2026 21:00:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1whCuH-002YQS-2U for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2026 21:00:42 +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 1whCuH-002YQJ-1D for pgsql-hackers@lists.postgresql.org; Tue, 07 Jul 2026 21:00:42 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1whCuF-000000006IO-0h6t for pgsql-hackers@postgresql.org; Tue, 07 Jul 2026 21:00:41 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id C750C63FAA3 for ; Tue, 07 Jul 2026 23:00:38 +0200 (CEST) Received: from s980.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id B342C63EB5A; Tue, 07 Jul 2026 23:00:38 +0200 (CEST) Received: from localhost (unknown [172.22.191.6]) by s980.loopia.se (Postfix) with ESMTP id B1FD92201768; Tue, 07 Jul 2026 23:00:38 +0200 (CEST) X-Virus-Scanned: amavis at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s470.loopia.se (amavis); dkim=pass (2048-bit key) header.d=yesql.se Received: from s979.loopia.se ([172.22.191.6]) by localhost (s470.loopia.se [172.22.190.34]) (amavis, port 10024) with LMTP id Fjhv2f6BDmtO; Tue, 7 Jul 2026 23:00:38 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.236 Received: from smtpclient.apple (customer-89-255-232-236.stosn.net [89.255.232.236]) (Authenticated sender: daniel@yesql.se) by s979.loopia.se (Postfix) with ESMTPSA id 1A1A710BC578; Tue, 07 Jul 2026 23:00:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1783458038; bh=gg9b7hPY/k++B7eHXyIR1Sa7mQgv4Z6Ze8HaohIaKwU=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=PbMETvTprkd/JZayxvnVn/VI+RxverMdioEf5sENhuT9HlNZ+B/66VHfuxx1ZqODc baxCXxgqpy7XVZ/Z7tEO1vGlfrIBH/Lj/HZHM5Xs9zcBTzvGw+kcq2vk+vDLnLVHh+ 684cs/dp6h+nHfGK0wcrkjDDSnhtVG4xqtnHcVnoRsX97C2emgVuBTaongaJp0wExc mTLhHUv+iIl26ZCLS9RXvffLcA3b2+BBcNjhixgXY80liJD2SXUiQGsumA6/CKRVlX RxK3HmvirY/ROcvXAO8/uuRlcgWVLeyBa2G38RcP33YkyvM15qWV6RptH5eDUgQ6KM jsHfDa24G6zyw== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.12\)) Subject: Re: allow spread checkpoints when changing checksums online From: Daniel Gustafsson In-Reply-To: <7985b839-8c0c-4194-bbf8-ee07ae5ef13b@vondra.me> Date: Tue, 7 Jul 2026 23:00:27 +0200 Cc: PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: <37745926-4213-49a3-b628-4136e9e49f9b@vondra.me> <7985b839-8c0c-4194-bbf8-ee07ae5ef13b@vondra.me> To: Tomas Vondra X-Mailer: Apple Mail (2.3776.700.51.11.12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 6 Jul 2026, at 13:43, Tomas Vondra wrote: > Here's a rebased patch, addressing the minor bitrot, and with some = very > minor adjustments. Thanks for picking up this! > 3) I've noticed the SGML docs don't have default values for the = existing > parameters (cost_delay, cost_limit), so I added those. Maybe = backpatch? +1, that sounds like a good idea. > 4) I've added the new 'fast' parameter to the DataChecksums module, = but > mostly just for completeness. The TAP tests still use the default = value, > so that it doesn't take longer. + spread (throttled), which may increase the time needed to = enable checksums, I think we should stick to the "data checksums" terminology for = consistency. @@ -1676,6 +1686,7 @@ DataChecksumsWorkerMain(Datum arg) =20 DataChecksumState->cost_delay =3D = DataChecksumState->launch_cost_delay; DataChecksumState->cost_limit =3D = DataChecksumState->launch_cost_limit; + DataChecksumState->fast_checkpoint =3D = DataChecksumState->launch_fast_checkpoint; } else costs_updated =3D false; This update will only change the fast parameter if cost_limit or = cost_delay were changed, shouldn't the fast parameter also be checked for runtime = update? > I've spent some time thinking about the default value. For a while I > thought maybe it should default to 'false' (in which case we use = spread > checkpoints, which is the less disruptive option). >=20 > But that's actually futile, because the cost_delay still defaults to = 0, > which means the "data page rewrite" phase won't be paced. It seems > surprising the first phase would not be throttled by default, while = the > checkpoints are ... >=20 > So I ended up setting the 'fast=3Dtrue' default. I think fast=3Dtrue is the right default. > This is not a very complicated patch, and it's been part of the old > patch series for quite a while. So unless there's some objections I'll > get this committed in a couple days. +1 -- Daniel Gustafsson