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 1vvHmr-00C2aH-04 for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Feb 2026 16:30:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vvHmp-007GsI-2G for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Feb 2026 16:30:55 +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 1vvHmp-007GsA-1V for pgsql-bugs@lists.postgresql.org; Wed, 25 Feb 2026 16:30:55 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vvHmm-00000001FLJ-1a7a for pgsql-bugs@lists.postgresql.org; Wed, 25 Feb 2026 16:30:55 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-b8f992167dcso822050766b.1 for ; Wed, 25 Feb 2026 08:30:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772037051; cv=none; d=google.com; s=arc-20240605; b=WdCYdZltsy2g+qH1ius/zhU6vyqU6KhmZi5ZcsSs9DbZlpfO0/lybBPogC/IgQet8L mKrIjNHOAu9s5eCiScH7+O/nsEScG+h2Z+1CCbxovMmBRuUgBqu3sdyRIGZuWwkPU18o 4Pbd3JJzy39HzySnbruOGvvgFkAjnBviSAUGKnrhgst8cm0B3/T6lTeQ9SBXz3lVFOwf 5YVvBGFmVy1E9q+5C8/+aErE1cqB1wMQ/E5aGSlXJYxNVaXT4qtVipBGUx+Oe9TFqVdd 2RppRFqdyStfYw6siCQiLVqvH8WAlUvb/kEYUpUVHgGzuJQH3JVraHGCc4qQyZ6z8ay7 fzXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=k+JDmSzxf3nyjZ+L+f8svNeVdMwh07c2bfAIaq2moxs=; fh=rudJTyh7NMimS/055IlMwaNneMIvv7ngcKu+EpduzRU=; b=JPnLg27PjNB6LTEspuA0FWDrXe0pMojc9i6EuO4nwYxwiTfxQ8qWMAwMPzyx7EUWST gyuUpMCK/lxS/bjLdR+7nfm9FkdS2GUZSEpFHJzCAuj15Nkk0oYJ7RrCslIX0xB7ZzS3 FmD54ZFSXeyRAwbWSLdcXtVYCVM0wzoIOjIQnWN0VqPG8J74+j/AEMcJcsDKXsry8Mw+ 2XkwwByO3fnGnZPa+lrxAtH+KXxjARas+b9h3eDHkJqPU4uvqrqnqcw4ZoQCT/AGTWiu 8Mwb5PE6rEdCoUd/YxN7JF2CgFkqhMpjZrZDShJ4X4bPrTJvW3+/fMAgPEDlY0OvcxZR DhnQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772037051; x=1772641851; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=k+JDmSzxf3nyjZ+L+f8svNeVdMwh07c2bfAIaq2moxs=; b=mLq+VHpYF8wBdNZ02Bmh+Ztda7ZK0ChRYTV0snvFvHvwMg//WuDcuNauPg+dtjwy6s 68HpAYD8+VFXgv+4APAl3VIFkgs/HwEMqK07NDqvAj3pIm6aDO3IsXRtZd4MutZwVjER gi0q6MzIeCQV773PzbsZau77/dawkMXZSn1i2ux5SLjqJKN0Q4aso56lxezTRPdrdJDv NhDY9fgewtMkqoEYcPQ3x2ILJUjSV2KKRQYrQXXJg0OG9eN/Be+WquoK0Lj0kLYq5YD1 Zv/9opIVB/nIBMLbhlHDSKLnBM8JdFUf17lWblvVFuoqK3jCUqBtV3/hWWwSS8zE/E2v vOKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772037051; x=1772641851; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=k+JDmSzxf3nyjZ+L+f8svNeVdMwh07c2bfAIaq2moxs=; b=jHb/8AnkZsA2fMDwxTAWbJb707aeMDjtjR+Hv2P/sEioImxcFSXx54pR5cKaD6GsAw xHkXoSEwlcrv3GOm3Dzp/9rz9Bs9MdjZHWgFN5dz3e0PfEXsxW6Ge9qaTSz9nQMdX2Ev sn1Cr5vFZJItCjwFfisBd7ZmNC+0P0l7+yekvvP9lvGaIODgujpC2p5yeaCtbBm28PlM BasveG65ikOOYfcb4dUYs4ZK7CtJPvRSN520VW/ydaucqVWD+Yk822U9i55eajfqiG8d Bg7z+X8+/7jMSM2dECQ4KfMMlFUWj01C5/yKgtq2AY6aS5Nojfoa+YZwg9LwRNrG/2nP 4vcA== X-Forwarded-Encrypted: i=1; AJvYcCX61QS0uH3IhvVAIZ+/nzQMvu/e2Ri086BoQmsi3fQyRwHQDfWUuShwYu7vfHi89sx6gFEPJlDwQqR6@lists.postgresql.org X-Gm-Message-State: AOJu0YyDbGLSiEXp1659Sx+NPjCz247o7ZdhRmDmfk0/fnjHobzjozmu wYeOwjDaVLRh7otXCEDXUb8os29y0zxipYk9Ox66QZRLNAi7MapyS30u6qWIEQR1PASpqeJZ2H1 2jfen41y1lvxEPMinPGmVq1UWFTWme/I= X-Gm-Gg: ATEYQzxmy3NcMs2JbjkEoLn+4cB4X77VXqJIFNAPCtPYRYnYzyHTgv/OtJZxGeNoOlP A6cxiqxSGWURbgXABDxyPh6XysgCetD/txSaZ+n7Llp+/tpL/cUQovNZ6ht42i1DJEvQ4ovrUQw f+woeb9a8rL2KWObSbai6v1kMPcEqORu5BEp6aGksFLu5WqFP2Rc76SzO+oFkmmJVlFoL5K+1RS sVcIegVHTJxOwiFGmB31++HU6TphcA6h9K/8RmjBawtOnx2PHB8ts3rmXKiPA4+49IFFFUZnGzS 3zhoT3Z48mwaj70BzLOaAkv5eyONByjcUCJTGXZcT9DqHILKsA== X-Received: by 2002:a17:907:da16:b0:b80:751:ee62 with SMTP id a640c23a62f3a-b90819ae26dmr1018720866b.14.1772037051027; Wed, 25 Feb 2026 08:30:51 -0800 (PST) MIME-Version: 1.0 References: <202502131716.7mgkcnrem2hn@alvherre.pgsql> <2939991.1740089974@sss.pgh.pa.us> <179448.1772033773@sss.pgh.pa.us> In-Reply-To: <179448.1772033773@sss.pgh.pa.us> From: Robert Haas Date: Wed, 25 Feb 2026 11:30:39 -0500 X-Gm-Features: AaiRm50rwEuiJCAr__QEg_PFf2dcT-l185eJ9NY_09FrnzUX6p530bN_Y90PYsg Message-ID: Subject: Re: Major Version Upgrade failure due to orphan roles entries in catalog To: Tom Lane Cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , Virender Singla , pgsql-bugs@lists.postgresql.org, Aniket Jha Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Feb 25, 2026 at 10:36=E2=80=AFAM Tom Lane wrote= : > So what you're saying is that I should have made the later branches > do that also. I guess it's arguably better than dropping the grant > altogether ... but the end result will be that the grant is now > granted by the superuser running the restore, which doesn't seem > very good either. It does not, but it seems better than having a v16 pg_dumpall and v15 pg_dumpall produce non-logically-equivalent dumps of the same database. My instinct is that this test: if (PQgetisnull(res, i, i_grantor)) Should instead look like this: if (PQgetisnull(res, i, i_grantor) && dump_grantors) In v16+, if the grantor is not valid, that's unexpected and something has gone wrong, perhaps due to insufficient locking, or maybe due to catalog corruption. The warning is a fair response to a seemingly-corrupted catalog state. But in v15-, this is just business as usual; there's no particular expectation that the grantor must be a valid role OID, and IMHO the best thing to do is give the same result that a pre-v16 pg_dumpall would have produced. I'm not actually completely confident that I have a fully correct analysis of this problem. But I do think that it's hard to argue that dumping the same database with different pg_dumpall versions should produce logically different results. --=20 Robert Haas EDB: http://www.enterprisedb.com