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 1x0wx8-004tub-3C for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Aug 2026 08:01:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x0wx7-00GJSv-2b for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Aug 2026 08:01:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x0wx7-00GJSn-1Q for pgsql-hackers@lists.postgresql.org; Mon, 31 Aug 2026 08:01:13 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x0wwy-00000003Gjc-3nVH for pgsql-hackers@lists.postgresql.org; Mon, 31 Aug 2026 08:01:12 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-48431648f33so986696f8f.0 for ; Mon, 31 Aug 2026 01:01:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788163262; x=1788768062; 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=bf460z56qp8l0TtxCGkzoIHFjoSmYt3VT5X/0T9EEgY=; b=JoyBUiaV/GF24FbVDt2URH2EAYqtsHE8er85xpSck9aGxB8v3bNHEax5OrsxsW/8jW vGV6T1feHuTc/7AeaAzPDAD84O3BEzM4wYatFiYbN9kBwsKJM4TSnbYpjdQqk9fFPLXW 3vdPdW6QMgoJzNDNfDTCqnJWw7vgiWHcLZWx/925AenyMhPai2ewy+WtVftfcysUOM77 j3fDagHavkIUUpCrXfWpzb25v6TzOFaLYCoK6NiDAIIl4bM/xow7D9RUQGT3nRBD6yUI 9//YaGDIvD8jEMIEtu5JylyyP4fRcEb9bYF+zYWOy0eCLnABL7MeK1oGnFQ5REOW+Q4/ LWmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788163262; x=1788768062; 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=bf460z56qp8l0TtxCGkzoIHFjoSmYt3VT5X/0T9EEgY=; b=srA5kvnCOyjjN+Iq3EvN/PE9fbAet+dat1OvUhiwMqlcyi+rUZu11Lp2/fMHcguCFl lK8TBNb4Lknox+fCPA8IdAfPPoU9RPkoigWCTJZVmHCVD2hzL+41XB9MChuzCc9Z9dKi kCzVSG79fJ6gA58VIdlgwsTlAYrHn84TzNb7Y3p3BTVCCluOYLZycLBeYMuxS+RRsBof TBPEXlPkSqZmIlgt2SJuGmudKglt3ZAgnlAOFDhIUoFEKhsvHQ4NWqF89K2AywWwSs55 1QSsTQauZYC6hkPjdZoBQnQ6pgm+V8PFEkA6SOwCEXTBWH1o0QMep/rpkjurbit9ZLmO Mnzg== X-Forwarded-Encrypted: i=1; AHgh+RoZc/WL14lQRJ+varxkBEscKr6ynf6jpZP1xHSJN4N+yiinlb5sTkPEF+VKuo1561oQ+MydNERnIaQ0Ob65@lists.postgresql.org X-Gm-Message-State: AFuF++kfNtg8/54CjWbrvvV0Ud0pbm1RtzvO3VuMLhBnD7x9NS739zp8 u0WeKthHympAon3ZM7z5rXblfH8NIztv7e0UamemUmfo/dQF7rYM5qORgIbPow== X-Gm-Gg: AR+sD11ESnj7YGgjUFHqhuNABqHnKZLxpOYdn5ahUY/deD2qsrWmNNTeb3g9vzokC2O FAR65IMHbgDDHBrUArpH55o2rGknpc7y0i65EEMcghFp3nOB/Yg0cMFgjcTyFz8ETtVp84Nyci9 oTNwqqtsgxUbRQ8TGk8NjhTWOCRZAKe/c8uS4mdiY7SKjgkhevIzBkt2kdw8u6ps0BtRzcKuvxX oRXy57gyZP5BR9DgECoC7s/ccp/JhtbTdEwT2G31kVkwTJXyKkM0qa17Dn2pCVR3kS2CO7taBRG yveRg39HM6HXrxei1swekEnyOHdUwMh+wDNGdHqIs/UZgY2ulcnlX+cBtKiw6UGpwl9wNcE3yxK ojGf4NdNxNFoNh2ZpHvO7WSHLrzdbq0UmKAN1ArRApqG/MpGTZSY9NXb8dbvCpt3x7FEhsLCvBh lDGlNQyYRFfc8SjVzrsayKisa3YhoQVFOnOYWxuQQflSJtxebOwzSgzxb2gCDEKNemhaOAu87UP IZMKJSMlm/qiRYOfNnLiBd9VGCv90ieXLdDrIWTELohS2lr X-Received: by 2002:a05:600c:1c13:b0:493:f783:c46a with SMTP id 5b1f17b1804b1-49cd53b60a1mr110927945e9.6.1788163261844; Mon, 31 Aug 2026 01:01:01 -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 5b1f17b1804b1-49b9269f1b6sm200793525e9.4.2026.08.31.01.01.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2026 01:01:01 -0700 (PDT) Date: Mon, 31 Aug 2026 08:01:00 +0000 From: Bertrand Drouvot To: Daniel Gustafsson Cc: Zsolt Parragi , pgsql-hackers@lists.postgresql.org Subject: Re: Offline data checksum changes can cause incorrect checksum state on standbys Message-ID: References: <6370C439-408D-40F6-B956-55DF19FFE41C@yesql.se> <8DCA12FF-0199-403D-A203-666528A25DB6@yesql.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8DCA12FF-0199-403D-A203-666528A25DB6@yesql.se> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Mon, Aug 31, 2026 at 09:16:52AM +0200, Daniel Gustafsson wrote: > > On 31 Aug 2026, at 07:06, Bertrand Drouvot wrote: > > > > Fixing this would probably require recording additional ordering information for > > offline changes, adding even more complexity to v5. Another option would be to > > document that the standby must be fully caught up before both nodes are stopped > > for the offline operation. > > I think we really need to think about documenting a lot of this, potentially > even to the point of saying that offline and online changes should not be mixed Yeah, that could make sense, at least to make the limitation explicit and warn users about these cases. > as they work with completely different durability models. Yeap. > The more I think about this the less excited I am about contorting the logic of > a feature which does proper WAL logging to cope with a tool that doesn't, > including misuses like creating mismatched clusters. We should probably start > to look at improving pg_checksums such that transitions are WAL logged rather > than shoehorning in such changes with a WAL logged flow. pg_checksums rewrites > the datadirectory without the postmaster given any information that any change > was made, which in itself should be a red flag. I agree. > Making sure that StartupXLOG > can detect the offline change (or something along those lines) and properly log > it seems like a better starting point. That sounds worth exploring. Would the idea be for pg_checksums to leave a marker in pg_control which StartupXLOG would turn into a WAL logged transition? > >>> Do you see the control version change as a concern? > >> > >> Yes, it is another non-trivial change in an already complex patch, > >> really close to RC1. It's also not an area where we could easily > >> implement bug fixes in a minor version, if we discover something > >> later. > > > > Yeah, and I think the case above reinforces that concern. > > I don't think the above reinforces not wanting to do a pg_control change at > this point. I think it reinforces that changing datafiles without WAL logging > is a fairly slippery slope. Yeah, I see your point that the underlying issue is the non WAL logged change. My concern was not about a pg_control change in itself, but that addressing this case might require further changes to the current pg_control design, which adds risk this close to RC1. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com