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.94.2) (envelope-from ) id 1tho7J-0075u4-KH for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Feb 2025 11:07:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tho7G-009hJp-VK for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Feb 2025 11:07:46 +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.94.2) (envelope-from ) id 1thn6Z-009NpL-Md for pgsql-bugs@lists.postgresql.org; Tue, 11 Feb 2025 10:02:59 +0000 Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1thn6W-000CU4-1k for pgsql-bugs@lists.postgresql.org; Tue, 11 Feb 2025 10:02:59 +0000 Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-4719141e711so16443191cf.0 for ; Tue, 11 Feb 2025 02:02:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739268175; x=1739872975; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=gHUI9n9NsVh9ztg/hfUTxyhy0Sd9sIWEPbzjIKGoQFU=; b=JzG6ACQ+Ioq4IWtgdlTZdNW8z+RqpEcm6skQ/zFi5V2r15uDkzf1FzzNkKzp3K0hak QpchmZ4t1ecN4z1aQc72IXmmFOzhE1KkC3GGv6dIvLDfiuv9neShXlyQJZoGXMbScr4C yaHjf6LWwr4ZCHD78TzEvScTgWvxwDpdTlmZQ7RMrrcW0C5pCprLUHCMM9teUgLqL2iv b5ushQVGUe6C4L4HYPxD8fl6ydQ17e4g2edFkG9Hw+RDYQynyJAnQX48Hac0xdeiXnM5 xQnlA0crBzsFLx4nMoI8rJ+KOveBRsRUxZQno0EcRAN1T5C/ITV8xh82OZZg/SLzpbhA jHvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739268175; x=1739872975; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gHUI9n9NsVh9ztg/hfUTxyhy0Sd9sIWEPbzjIKGoQFU=; b=l0UehlBYwQ6F1YXUAtNGrr3vruBA7qo1uSssUW+ZwIzWv6MdijKpXMnPbj3Ff48ZvC DmK0oOo/iE9SXGl81RN5FwoqUDgYCqfIhDX3DZxIv8grWVH92NQfcHZNRxtpaVvvWk+5 jlJTU+GPwHRMF0ytlGQqekhHoIjDvcjf1oHvx3vCFpx9X+PyE/hNh24Og82rWsYEcXfq bF4ChGqw0lhSD5rTNobEsix6Qy01YKA/WEQYeNnHomuwPq/h3nQItxURSpnPsOS/dqXo thGfmkPGjBUqtoYRDAfQ+mi3l0bRJ+eQnQedRffYyFjL4Yk16K6HVYyqJMkdFxF5U/j/ yLJw== X-Gm-Message-State: AOJu0Yzseo7sEIva+lI7jFojkJg16/1guaT+1QXPDMuGqYBITaH2WeB6 1Sibv/cuWRJg2vNYb3DX6iCTIGa0ICZEaXqaAdNV6C+SOkaYND7QRccK8+2KhOPJ7Du5GvNxAML SftN21Di+vZfTq1hWrI0yv+oxyi8jazZB X-Gm-Gg: ASbGncvUMHVFh8uHbKjDPwdFTfe/JFcP0MmBuNpHJLtT7zDlzKDIXV14SG2031PB35k BWP/olwbdVML9bkMN6SUB/1tChpKWCc0SZ8kOTXp3Oa5Es5k2rxdnRJIvNiOOZZm+L/zc8fzCpY qivrfDT7O0nyZm8mj7RglwJnNA X-Google-Smtp-Source: AGHT+IEpK2Huduu7FwkgbxhkFjmzUZydlcjCDuCr9fpCGvJ0y061vsI4GubjLDRCjHtAHeMsn/FvMTzmqE/Cs7gfuCA= X-Received: by 2002:a05:622a:144d:b0:46c:870f:f625 with SMTP id d75a77b69052e-47167a29680mr242641461cf.29.1739268174165; Tue, 11 Feb 2025 02:02:54 -0800 (PST) MIME-Version: 1.0 From: Virender Singla Date: Tue, 11 Feb 2025 15:32:42 +0530 X-Gm-Features: AWEUYZkq3ADaxEv4vKmmLYkwuvRRe6Vj33c0wf-uV5h9b5nQQEpTvagwXn2cm-o Message-ID: Subject: Major Version Upgrade failure due to orphan roles entries in catalog To: pgsql-bugs@lists.postgresql.org Cc: Aniket Jha Content-Type: multipart/alternative; boundary="000000000000b0c1c1062ddaed62" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b0c1c1062ddaed62 Content-Type: text/plain; charset="UTF-8" Hi, We have identified an issue causing upgrade failures. The following steps detail how to reproduce the issue: *Create an orphan role entry* /* Postgres version:: PostgreSQL 16.6 */ /* The same can be reproduced in version 17 as well */ create role my_group; create role dropped_member; begin; grant my_group to dropped_member; OTHER SESSION: drop role dropped_member; BACK IN ORIGINAL SESSION: commit; *Upgrade to Postgres v17* And the upgrade fails with an error : *GRANT "my_group" TO "" WITH INHERIT TRUE GRANTED BY "postgres";ERROR: zero-length delimited identifier at or near """"* The issue seems to be coming from pg_dumpall for building grants during pg_upgrade. https://github.com/postgres/postgres/blob/master/src/bin/pg_dump/pg_dumpall.c#L992 -Virender --000000000000b0c1c1062ddaed62 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

We have identified an issue causing= upgrade failures. The following steps detail how to reproduce the issue:

Create an orphan role entry

/* Postgres version::=C2=A0PostgreSQL 16.6 */=C2=A0
/* T= he same can be reproduced in version 17 as well */

create role my_group;
create role dropped_member;
begin;
grant my= _group to dropped_member;
OTHER SESSION: drop role dropped_member;
BA= CK IN ORIGINAL SESSION:
commit;

Upgrade = to Postgres v17

And the upgrade fails with an = error :

GRANT "my_group" TO "&qu= ot; WITH INHERIT TRUE GRANTED BY "postgres";
ERROR: zero-lengt= h delimited identifier at or near """"
The issue seems to be coming from pg_dumpall for building gran= ts during pg_upgrade.


--000000000000b0c1c1062ddaed62--