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.98.2) (envelope-from ) id 1x7wa0-00000000oxh-34dC for pgsql-committers@arkaria.postgresql.org; Sat, 19 Sep 2026 15:02:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x7wa0-00000005G5R-01b2 for pgsql-committers@arkaria.postgresql.org; Sat, 19 Sep 2026 15:02:16 +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.98.2) (envelope-from ) id 1x7wZz-00000005G5J-2xo6 for pgsql-committers@lists.postgresql.org; Sat, 19 Sep 2026 15:02:15 +0000 Received: from mail-qk2-x0f.google.com ([2607:f8b0:4864:34::f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1x7wZv-00000000DC6-3rDC for pgsql-committers@lists.postgresql.org; Sat, 19 Sep 2026 15:02:14 +0000 Received: by mail-qk2-x0f.google.com with SMTP id d75a77b69052e-530e2f50d01so20965461cf.0 for ; Sat, 19 Sep 2026 08:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20251104.gappssmtp.com; s=20251104; t=1789830131; x=1790434931; darn=lists.postgresql.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to:content-type; bh=+UnVL36mZ7kXLGnwXri+BDGj0wLQ7XmMfYZam3gcJ/w=; b=JA6DnGeyZS6FEPO4W3iBltNHrbvPCBFOSA+Fy4WH5+X2FdJKZTmgSyyIGtCVcCBMJw 6fCMi1CxoQXyjYY350zSTd8mcevDbWjKzw43f7FDkdr+LYqS9BSqfZThAL+d2jzng8wc 2V2rrUTKuh1cubLM9Emv2T0Tft7QUtajtbtK0lcozJQ+ApELWtTWxfoR4IpZPlTZGCC2 YLt0SEUR32j95eQc/CthvptQBi1SuHdj0dpqyMxh4EOVwUv6+UWNFPxTBtGFqUGCQs41 XYa+jG1MXvMBHZGdF6zuBCBKnsTDPJeKSry1Uth6tI+REw0w0QBsxJ4BwvxmtLVNG2Q1 E0cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789830131; x=1790434931; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=+UnVL36mZ7kXLGnwXri+BDGj0wLQ7XmMfYZam3gcJ/w=; b=09OzBQDKd3vLj038Rlr1IL/+BANK4bL3WRplvM89eaVHbxyZALPzyEfZG1eq6c0Oq2 EasUdrfBFrJ6/SS06ezYgPM8ieCnzNEN65v8qUaFHtn4TeRycTbiUjqlmF6I3aaNEfVM /yciz3Cl5unHXdwaMyXRjan5QVJbQ8VLUau9vhxa3TGEKkRGBk5vFHMBW7DIfBa2QSOx Zj+fQWQB8WGTE/k58hfCmawgJmXBFd9jZ8vMIUxZre8adg+9cqvJH6fddh4riOgslSD1 ZXrP3XJFx5CFhfxdUpmtiYe9ZiCDDUWdGyWEOhzWlVnP75bc150cxBYupTMQX7+4Xyw3 YuvQ== X-Forwarded-Encrypted: i=1; AKwUvBzfGJuVwDj0b1/uGAm4HOmeCbpBUm2WcTWstefSo9kOse16TK6wvZwL07d191vcga7X/xxWKHKEANOB2x3bBjsU@lists.postgresql.org X-Gm-Message-State: AFuF++l09E1hHh63el9ONbuSye/7iiUHtknsaeRb27w9Y5IeOjGDI24T T5IBVm0179BOwHfiIezb6d5irdbr48NQuiczLplQ99m7Xg7Ui5Ac9wozVG3jEorbnj8= X-Gm-Gg: AYBFou0+VEYWJwao5nLCXeIGnFFFZ+IXjeWWCOOMrL/9khQzkhIXK7HREIc2NkhnbgO wM8ySXNGJ5gxntiLORcaqBHmycC8fkccKLG2/iDib2pdTJo1NHlGwrw2t+Q3KztRpWayCCN3b9F TOAHpgOlq+lcreCSs6AyHNeOnI32+E+H/vZwG7Aw9lxTyhpVzU22XgsVaUgwI+7RZWPqUrtPgnN S/Vy2EaoU5xaa8OLmIycqFTfaQumn5xqHevRk4/ak6J1fxdRpuPopzVpTGnyxEidcWRn7SwzKVj wmapbwjKV24vZ0WoomHBx1+JsrgE9RifHsgqEy7+YF3QCHR0W+IKwTLk3XjafWdiIVYrGdF24nu dZgXK+00X0qw28OpkRkWwfvVtTTInZDYSj3XptEjIBG9FuBmRCJEtnxfuakqSQMX/TJNFCjeWxd nIw6NRnrTJK3QmhUKMjIcTm4F0hKAmOeyqWtNRl8uxyzbYEdZcSC5UfTGu4P0tEPhP/egBO5ZBM c20QntmsQ== X-Received: by 2002:a05:622a:1182:b0:532:85bb:601a with SMTP id d75a77b69052e-532b731acf0mr18095311cf.43.1789830130812; Sat, 19 Sep 2026 08:02:10 -0700 (PDT) Received: from ?IPV6:2605:a601:a6a6:4300::303? ([2605:a601:a6a6:4300::303]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-532ae2c6a33sm22091401cf.0.2026.09.19.08.02.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 19 Sep 2026 08:02:10 -0700 (PDT) Message-ID: Date: Sat, 19 Sep 2026 11:02:09 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pgsql: Check that oldestXID and oldestMulti are consistent at pg_upgrad To: Heikki Linnakangas , pgsql-committers@lists.postgresql.org References: From: Andrew Dunstan Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-09-18 Fr 5:32 PM, Heikki Linnakangas wrote: > Check that oldestXID and oldestMulti are consistent at pg_upgrade > > Now that pg_upgrade will rewrite multixid members, starting from > oldestMulti, it's important that oldestMulti is valid. Add a sanity > check that oldestMulti is not newer than the oldest datminmxid value > in pg_database. > > One case where this could happen is if the cluster was previously > upgraded to version 9.3 with a buggy pg_upgrade version that didn't > have commit a61daa14d5. This new pg_upgrade check is similar to the > defence that was added in commit 78db307bb2 to VACUUM to avoid > truncating away multixids if oldestMulti is too new. This pg_upgrade > check differs in that we don't try to soldier on with the upgrade if > the oldestMultiXID is inconsistent, but rather just abort the upgrade. > > Reported-by: Noah Misch > Discussion: https://www.postgresql.org/message-id/20260827231757.78.noahmisch@microsoft.com > Backpatch-through: 19 > > Branch > ------ > REL_19_STABLE > > Details > ------- > https://git.postgresql.org/pg/commitdiff/5cd84ed6274ecd552f2991c54710608c0ef4cdc7 > > Modified Files > -------------- > src/backend/access/transam/multixact.c | 28 -------------- > src/bin/pg_upgrade/check.c | 71 ++++++++++++++++++++++++++++++++++ > src/include/access/multixact.h | 31 +++++++++++++-- > 3 files changed, 99 insertions(+), 31 deletions(-) This has broken upgrade from release 9.2 still supposedly supported in release 19 (but not 20, for which the minimum will be 10). The log complains that datminmxid doesn't exist. Since we didn't have multixids until 9.3 could we just skip this check if upgrading from 9.2? cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com