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 1wbwYs-002xxe-3C for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Jun 2026 08:32:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wbwYr-00AWf1-2p for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Jun 2026 08:32:49 +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 1wbwYr-00AWer-1y for pgsql-bugs@lists.postgresql.org; Tue, 23 Jun 2026 08:32:49 +0000 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wbwYp-00000001tHj-34xV for pgsql-bugs@lists.postgresql.org; Tue, 23 Jun 2026 08:32:49 +0000 Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-4859b1fc7a8so2736973b6e.0 for ; Tue, 23 Jun 2026 01:32:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782203566; cv=none; d=google.com; s=arc-20240605; b=eVi7azrBM8C4GoRKgyxjYaF7RPaGUJjr6uILEFaYLBg+jWT7GznjTK1unZBwt6ztMz xok8dh/h8J7g24uq/WIlnIFpUIAz4R/MTOYlzrAvYCIhh09lSEm9ntiLPhm6GmGpy5Kk YRPQc71KY09v/dVP/0gGJetvwWcJ7fwz7KHhKiHC4mzXhxsTha7xmbad/VuQtr5KiexI 3yOQeSwFzxThejVIRIsfrV5yPII1SV3jtmOBYgliBb6DDA8yjdQBAZSh47rO/+htEiV6 0b77W+5xpU1O/DuKxxfREtBqSySk36OBtqg8dMz3pejgMywrkmnLknhER7sP+0L9lCHe /gvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=wUzJuVsmSfBear4B6gm6VVIis4YQSSF5iTF4WbhlnUI=; fh=QtYmdA8iXn+8n94iWHALVO3Sn5MH/D6hzl4yaQRX9qo=; b=AmcnU+FGrHUv2Tz3FpIcB429+KfOLzPzo5lKVNDQ8OdB+ZbevyhBdgZf185kGU23Q5 jN5kX3Dxyw2XMmx0zAhjfdOVlzZY5PAgSB/E6lkNWBb0m8qKBy5JpE9FL+8zZexdOmPb Miu/qsywh0ifEZK67G3eXX1k3cnO35G1FqnwJdhbJFUI6X/3pb/eyWUMckEl3unEhaLw G30XwY3Ag5YirueAMGKd00xEYX9mERwsH1sNlZmAZOI1aBGcFvPAyH0EUsbNZBJS5pnL ZplTBuyJBqIyNwkvVF2l05RtXS8mH9GpwcbCSsrW2zvHjKC4kVuSMW1buWCbIrOo8B/L p/vg==; 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=20251104; t=1782203566; x=1782808366; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wUzJuVsmSfBear4B6gm6VVIis4YQSSF5iTF4WbhlnUI=; b=HnJgo1iSrOa0g6nXbEmkm+3s1CE/2kt97vGWAvl7d91EugXORWgtvz8mCNFjZ72x7R il5XpHFGFqBkBi8oW8ta5G5hDtmay8frjTjVBPduTVEEaPhx/eUj3QNc4508Q1CvfU/B FYx/sCEP4E+5SUjceaIcZEBfooJh+3Vg0ML7iTsXwT/YHLXz2Ahe6Gb5xCTE3iyzTSGn IJ6FO86PG8iwSNBi25azaI44ZLuJM9e2vPiWCBAL11AAXvvYPaHbavGhGfcSeaIQTnEv TUA8BlWoD8THGKAidyf6nekqPprF00a7nxgIcmZeGjCM/bwSjoK4Vx0WnZIo//QZnjbg nIxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782203566; x=1782808366; h=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=wUzJuVsmSfBear4B6gm6VVIis4YQSSF5iTF4WbhlnUI=; b=kEcHkuLF1YNSuUiSfWviA8S15Q7wpEGBfeJwhZvtgVIFxVsJrV415sD5T7EqxCogMK Q7YT59EL2MlKx1xWFy0oKAAxOF7m/3IKowofegs20Jee2+oX1oUwCEdhxjjjZdWzKQP8 SZ86Pj8PhZXV+pBrqcYdxrD150dRpOZkhr670q3NSywQWBfU6ah0GmuXFUwtYrPFkGXf u1+05KNcM98+OkD4ZVSi1/6CZV0lFW8g6Go9eZtSsKp9rK/ivUA/kJthJBYlIfekcQfp SZFVbBYAUkKvoQ/KOZ609J97Wv8FbWiXDilgx00RFIC1ty+/eFvYbQLX3nS7Uadb6ykr FfVg== X-Forwarded-Encrypted: i=1; AFNElJ/smoUt6gFrZLqxkyKxxbTLbWPCu3WXE7hzg9QVDDmWixq9vzzWWhWakz/bJn9nxuOM7ipJIsYXPwaB@lists.postgresql.org X-Gm-Message-State: AOJu0YwkS/LDlvqFM7L2u8Hn8ZSqovHyk4tWhE6enBZ4KgkYsBg6J/JS yEAg/L2hiWntLFdtcbsOEj2QmoHgyT/qmAzfIw/t+MUqtytLeIxKGDTDjUzs264O25LvLfuszXE q4VVlStJaJj160l+ZdcT8cCE7PIlgJFQ= X-Gm-Gg: AfdE7cmDrT7TPWFyKd7cqXaAjitdrgYxj1KAI6+pKPbWbYBu85e+cjaH6CazzZ5l6TU BqU80hc3ha4BwguKRK3Rs8wvi7ga+t63W/RPYsEQeHveW6oJ8rNmK2aXkaBOePxOOZo8TATUWl4 FKtwj0NhHsyBYGyTd2dygira4HL/3vkS1T6Ufd3/5ON4I3hC4uZgXqSHZFZOfwzs2CBD+NeCW0J SW74hRwUIbA6qR4bRgbmm8S7OpI3brQJTCFoUj/WApj1DSeizBJHbsgz9q6elJbr2NFsh88e2qt nnQwLVMZWUqtfDiLiLOZLtLFBmOpX4B1iryCgeG/ghDg657Zk18IMkg= X-Received: by 2002:a05:6808:c197:b0:486:4892:d553 with SMTP id 5614622812f47-48f24390324mr1429704b6e.0.1782203565643; Tue, 23 Jun 2026 01:32:45 -0700 (PDT) MIME-Version: 1.0 References: <19483-80de42dc4e62cfd6@postgresql.org> <104812.1780847519@sss.pgh.pa.us> <5184088806e70ed5db7e83bd6540a016b3802c1d.camel@cybertec.at> <0d7531c192859057c6aad54c89a8d453376bd00c.camel@cybertec.at> <592839.1782153054@sss.pgh.pa.us> In-Reply-To: <592839.1782153054@sss.pgh.pa.us> From: =?UTF-8?Q?H=C3=BCseyin_Demir?= Date: Tue, 23 Jun 2026 10:32:34 +0200 X-Gm-Features: AVVi8Cch2hsanerUZyMCsFLuF8ITUucuuZTXiutzKI5vjxrUwJhweUEVqmvAG3Y Message-ID: Subject: Re: BUG #19483: pg_upgrade fails with orphan records in pg_init_priv catalog table To: Tom Lane Cc: Laurenz Albe , Greg Sabino Mullane , pgsql-bugs@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > I have a more pressing concern: has any performance testing been > done on this? It looks like it'd be absolutely catastrophic for > pg_dump performance on databases with lots of objects. > > The implementation direction I'd been vaguely imagining was for > pg_dump's buildACLCommands() to drop any AclItems that contain > dangling role references (ie, numeric OIDs where a role name > should be). If the given role name contains any non-digit > characters then it's certainly not dangling, so most of the time > this'd be a very cheap check. However, if somebody does > > CREATE USER "007"; > GRANT ALL ON TABLE mi6_operations TO "007"; > > we mustn't get fooled by that. The backend is doing us no favors by > not making numeric OIDs visibly different from all-digit role names > in AclItems. In HEAD I'd advocate fixing that on the server side > (as attached), but we can't assume that a back-branch server has such > a fix. What we could do with an old server is issue a query (once per > pg_dump run) to collect all the valid all-digit role names, which > should surely be a short list in most databases, and then filter > against that within buildACLCommands(). I see the approach and it's a valid concern. I can create a v5 to comply with your suggestion and can create a new patch to be applied to the current HEAD. After preparing the v5 I'm going to create a new CF to be patched to HEAD since this fix will be backpatched. Regards, Demir.