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 1wcewa-003WNu-2A for pgsql-bugs@arkaria.postgresql.org; Thu, 25 Jun 2026 07:56:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wcewZ-004OUD-1a for pgsql-bugs@arkaria.postgresql.org; Thu, 25 Jun 2026 07:56:15 +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 1wcewZ-004OU5-0o for pgsql-bugs@lists.postgresql.org; Thu, 25 Jun 2026 07:56:15 +0000 Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wcewX-000000009gp-1Ejw for pgsql-bugs@lists.postgresql.org; Thu, 25 Jun 2026 07:56:14 +0000 Received: by mail-oi1-x22d.google.com with SMTP id 5614622812f47-4863ee8474eso1076509b6e.2 for ; Thu, 25 Jun 2026 00:56:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782374172; cv=none; d=google.com; s=arc-20260327; b=F2Wslq2UPydQTl7id2gHqnq3AXOtBeLKca7xfD3iya7fabuDcl8Sl3uAJuY1aCMp28 a5EYUMTw8XQQRv4Wty1s/1oFcfe7mTEl4GG6R7SRSdyWaOsz8bRQg3cblVihhrmHcyN0 Q3jRb9ACOmKOvoG1MqYJo6o7nJJpAXNGu0jlG9dUBJbLdbuYi96AUSro36yUcRo+XHm+ pReNZSUFXeikJSvsjjmkYRYw5+C+bf9AIC7tkPVNSfaBFOZetiuKlf6NiB/h++6YI3Iq 4j1BNOupxT45IWbmfNTvYmyfGvfHbvy8lO8rqoTyZbG9v1Lt9TQsHPCNx2XX/7YIxZDs 9o6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=+oyduzFbe7BG7W5s+V3G8q6MTeoz53BND8Ja1KyW1A8=; fh=xM8MdVTbpNijeQafb7e2NHDfjnZzqDalKT8qKGOQpnU=; b=XHOMyFLMHkUMNPFaZSMjTQzKBaSq9e7HiHLqzEIg5db/YeaOUOCk7/Tcfnh9oNkxoL go2kEclldREQGigIUseyR5IbE5BaA9cLwnpnvyp88iihtcntXclJ8UXL/aFe/ggIQwZ8 7qBt8okReO0T+bArTPa+sqUS8PgVT7fXpq4+tWjzn41cBw4d1EYe5G1shUGi8IHei/zX xXI/2crQqzMzYEw1Sh6FoJQVlgX5TOocjQTZ+Hps4l3Hk0hWyp6yU054hcEQ1CLQBHxA t5zQIRAtKOa83Opg2i7gaiIeaQFfvVYwwkZ6oYfyMWnBBp2T7/wvWmoDIAJ1v47dubGA EpOw==; 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=1782374172; x=1782978972; 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=+oyduzFbe7BG7W5s+V3G8q6MTeoz53BND8Ja1KyW1A8=; b=k+IR5NRp1cavblsq+Ndaty2jjaBNsPupOySilm6g9AFRQDPLPOSOgxZB2j1d2N2AC9 1CwA2lHIyrA19hRNu/n7w6i+2qTWMWbKy1H4BsKlCVfI3syfYVYuapqBMVcnyK+YIrZY IlBF8NfggEzsfDBD2/jA/KQ81jYNYxbaU5o09deRy2ORpVzs/Sta37hFDCtGO34IvMrk RCU5z8kQWaG2SGXVEU20CL5wJIzCX3aDv9j4fSPJPCDMNIad12Uf1IKJcrNt2hD+4+hI IU9fwmk4oceWpeqFAumW7VPyq23xJRnJzqF0V5HdDuwjzxLMyJOVGDHMvS+F6qGqyiKb DqnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782374172; x=1782978972; 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=+oyduzFbe7BG7W5s+V3G8q6MTeoz53BND8Ja1KyW1A8=; b=kJBKPGA94/xvwlRsuy1jRm9362TAuM1jQFdDc1YjpQMzPiaeA59PD2Ev3q721cTtnu c+pIdonnKfibxmq9nVJS4YcSAi0gPqFQq+ydS7Ruh0fQzhMMFUpCj7O8vh8g8A/aX1Nv ItjldZ5jtWK8V5NhMalIko8+YMt0W3usLOD7rcgwGdbJ+QgARaaRaHqf1/3+At/3GTtm TfNEXgkVA+8yjDULC04j2Jqdl3R4UmTcxmirgdRbsCHRH4eQ2vxs98tlmsvdYrSt+Kc9 RjUp0/zi9gyJdXa4WTabyNv5Ag2xdMj9JtOUMKsOMYqBZXZDAtl7zlYw7Av/spj+daBx TLaw== X-Forwarded-Encrypted: i=1; AFNElJ9E0DiYcx4Keq/INPA1s0LrbWzpcQj73U0JHv+NU7DVmdxG51zkMcYQ+s53TJO5yEj6RtyEMtze0ag7@lists.postgresql.org X-Gm-Message-State: AOJu0Yw2nKC2lR5J5I49YBwxuqQWVsBEK/DodgQRXUIDYzq6Rg/k/f4Q NdXSZuYw6Ep/884wBPmlOJ71y6vMNKQEAg2eowjZUaL473rY9qiHzD4+hog/N4mynXHA4ymax/1 i9JPJT+BYnSXJleUCEAiatM8uMkJM1tDWZEnF X-Gm-Gg: AfdE7clv7qKICT4n6FaBWgvyw2qvD5NaSRIakRNsyAigDWmjvgCg/op849ReHnX60No OLYbc7A97HESHoZBAGN4LH05LQ5m0zEgeTHB+wH2QG/OZKtX+1zQOzJADMdIYJQCU9VPsxEBU1y FMQyYtKjHkHWGLHc4zUxKh6nclrRxoINqVuheuAWZid7XDNvYR5w+Fz3Xv2j79W2tgQqQHTtCiW kG0mRIWs0UZD6wUzREdgxkFyhfcU1nZewtJYJmq4qfy6K+Az15ktTYQVruCM/75hUssnPXADACh tfHwzgIrLQd07ImSP3ptJlxXc6tNVZ+AIKviGhgqTSceQ0BeJGGNyGqp71vsim2vJtAmMsvTCW6 miw5grk/vU4MfvRws X-Received: by 2002:a05:6808:4482:b0:48b:7c11:aeb9 with SMTP id 5614622812f47-49215c52f99mr1653748b6e.15.1782374172618; Thu, 25 Jun 2026 00:56:12 -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> <1030965.1782313078@sss.pgh.pa.us> In-Reply-To: <1030965.1782313078@sss.pgh.pa.us> From: =?UTF-8?Q?H=C3=BCseyin_Demir?= Date: Thu, 25 Jun 2026 09:55:59 +0200 X-Gm-Features: AVVi8CekmN9yxRLtupMBBPhJytMgK0WacmzD8r-w1W458Frq6SGQs0xxPEaAFWc 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 Hi, > So what I'm thinking today is we apply the putid() fix only in HEAD, > and make dumputils.c ignore unquoted all-numeric roles only if > server version >= 19. This means we don't have a fix for the actually > known problems with old server versions, which is kind of sad, but > given Laurenz's point I don't think a reliable fix is possible with > an unpatched server. > An alternative answer is to back-patch the putid() fix and teach > dumputils.c to consider the server minor version when deciding whether > to reject unquoted all-numeric roles. We don't typically make pg_dump > pay attention to minor versions, but it would provide a pathway for > users to deal with this problem: if you've got dangling grants then > update the old server before dumping. It will require an almost mandatory minor-version update prior to the upgrade, which adds extra friction and a more complex upgrade story for our users since both sides need to be updated. Another point is that quoting all-digit roles alters the aclitem::text representation across psql, extensions, and client apps giving it a much broader behavioral impact than just pg_dump. Finally, it introduces a bit of a maintenance headache for committers, who will have to adjust the macro on HEAD after back-patching to v18. Happy to hear other ideas. Regards, Demir.