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 1x1ykW-005WTB-38 for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Sep 2026 04:08:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x1ykV-00Fg76-34 for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Sep 2026 04:08:27 +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 1x1ykV-00Fg6s-29 for pgsql-hackers@lists.postgresql.org; Thu, 03 Sep 2026 04:08:27 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x1ykT-00000002ey4-0f1N for pgsql-hackers@lists.postgresql.org; Thu, 03 Sep 2026 04:08:27 +0000 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-482e067e908so1605520f8f.2 for ; Wed, 02 Sep 2026 21:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788408501; x=1789013301; darn=lists.postgresql.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=/WYUhFIrYncmPNsKzXTjp4w/kkKQDAOV5XGvI4XMW0s=; b=Ksf3kB4Q2lrlT52nI191F+FhRm3ZmKGgvJR5QkU2NoJC8Xli873XMoafW7bNcN/HR8 mJbx505sxT9TC7+rgsdZU4pPIa8rZ/QlY30bNZGMa5aHWpjz0O3HeZqDIlW7WMHIr5rw sm330ke9qmTcTnkhFA8a1f0pmV0R67dfOrrGTRE2oJnVUoqOPmGag8QcB+Y7KpysjZh1 9iC2l6hGlnRSoQqMO8iRL4Y6oNoDPS/rwSIYMjuGE4fGZm3rc8o4PhuK2SGkIohm0XgR ULnNIfM2WdlLIqRUyKpnV8cWFGYfJx2Eec5MhwWNf+3ad1Tw3ON1UYDuBukLYdsKEpzn q0xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788408501; x=1789013301; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=/WYUhFIrYncmPNsKzXTjp4w/kkKQDAOV5XGvI4XMW0s=; b=B0C09bh0Xa9JGp7EJQzvGZRw0QrTXCZuLwcn+f+T36unPMNi8uqVL1Ck14E3o/eFVZ mFa3/FIVzYMqaOqu9/VVqrO+xUU9lh/6c9FvAq66nMYnWaR5hYScO4lsc5DtYbJefVFG Zsb65Ehxc/2XN/J0es8ZgLpZ3+Yx+v8DsE3kqK7r7rOyeBHNw56U0eSV7ZLBjnKMdqj4 gPgANqi6hirH334vdUMB5U+nPcBdyWBWhntpL+1J+tgfbE9NIS6DHmmatU7Yp2QAqWpX 33au0CzdNuQoJDXTYLryROt8vGORln03AcMonGQGMz55lHNE4FKlOrYwgNU4WpzF4MFE HPcg== X-Forwarded-Encrypted: i=1; AKwUvBwGmSoDeQ8ulTYs6VQdIaX8ht1w/TWmv/tKmHuQfESK/k7EFuhWD485b/OAwx5AO5VFVBdXHaEsIWjDTmtP@lists.postgresql.org X-Gm-Message-State: AFuF++kcWU1gUxljEeThWewLEuVtirIHjssag9SFMldVRB8hyH5uu+DJ cqzzb0NrTvU6oD2/nn/a2COKfFiRe6BwhuYowomcNSetMrPP0vsDitZ/ X-Gm-Gg: AYBFou3dvezl//fiMLQ5gmUuuYF55qHhJOozw3/TRVFft0HMMsRdLRzHodabrewSCSD 11Wf790C5gaw/DuLpC2uENPXtB8Xtuj1PlPykoy/T0n5iOhm0lv7vtNCEtzL93aztQhwHGSuFdU I/jUn9+e7KfPxx0W/EaGIcIqQKvm15ijpDh9o0DMXmWAfp77NBF5mpTUt8Cq7WNxY16/ty6gD+Q 8fyOlWb5+jUmCKVyppPK5Mvi3/G7NW3gkFCtBgYu+shcrTuF05uqAymmCsf3Yf6H+0NM8xnLsNw 2WaWdCpwfcOlcJwGLMX6L61Nx22eXNNjLC5QCQLbQKUHyenpd/bTlsseUdWlTGu6+yRQY5CJCW5 g2O8QJ4x+dM3dlgbWGy9chuljlQ9E32EmXq4ZRrjJp0B7wUm8V8Epnwj7WY88r2mjTMVFw6/yew fuOuJvv8S80puhhrFmmXUfrk1vXtIQ7Dk5c9aeHYMIFpKUf2MjuCt4p49mfShgViOJMSYmR190O QfARNZNywTGJN5pZCaFN2kuDKfOE6a2kcGetAPv/UQKents X-Received: by 2002:a05:6000:260a:b0:482:ea99:6166 with SMTP id ffacd0b85a97d-48488df7809mr17509868f8f.7.1788408501060; Wed, 02 Sep 2026 21:08:21 -0700 (PDT) Received: from bdtpg (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-484492cdc37sm11192030f8f.34.2026.09.02.21.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 21:08:20 -0700 (PDT) Date: Thu, 3 Sep 2026 04:08:19 +0000 From: Bertrand Drouvot To: Zsolt Parragi Cc: Daniel Gustafsson , pgsql-hackers@lists.postgresql.org Subject: Re: Offline data checksum changes can cause incorrect checksum state on standbys Message-ID: References: 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 Wed, Sep 02, 2026 at 03:34:40PM +0100, Zsolt Parragi wrote: > v11 adds a few more edits based on Daniel's feedback. So, I compared v9 and v11, and the additional C changes look good to me (persisting the complete checksum state at the end of recovery and protecting the control file read with ControlFileLock). I just have a few wording comments on 0001: === 1 + * record over it. The control file also carries a watermark, the end LSN of + * the newest XLOG2_CHECKSUMS record this node has written or applied. After pg_rewind, the watermark can be the divergence point rather than the end of an XLOG2_CHECKSUMS record. Maybe use the wording from pg_control.h here? === 2 + each node in the replication setup. Nodes can be processed in + parallel as they are shut down. Processing must have ended s/as they are shut down/while they are shut down/? s/must have ended/must complete/? And also, one that was already in v9: === 3 + * record: without that, a checkpoint could read the old state after the + * record is already in WAL and insert a redo record that both precedes the + * transition in WAL order and carries the pre-transition state. I think that should be s/precedes/follows/. This would also match the wording in CreateCheckPoint(). In the commit message: === 4 " Recovery from a base backup is the exception to not adopting " I think this is not true for every base backup. A backup taken from a standby keeps the copied control file state. Otherwise, adoption only happens when the state is not node local and its watermark is below the starting checkpoint. Maybe s/is the exception/may be an exception/, with a short mention of those conditions? Other than that, v11-0001 looks good to me. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com