Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oC0E0-0003M1-K0 for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Jul 2022 14:53:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oC0Dz-0004Ug-9B for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Jul 2022 14:53:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oC0Dy-0004UX-2I for pgsql-hackers@lists.postgresql.org; Thu, 14 Jul 2022 14:53:55 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oC0Ds-0001qi-JJ for pgsql-hackers@postgresql.org; Thu, 14 Jul 2022 14:53:52 +0000 Received: by mail-pl1-x62a.google.com with SMTP id k19so624315pll.5 for ; Thu, 14 Jul 2022 07:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=/JhRtqyidVMi3rWP/EOBhwgF+IMAdh7T+kQmFL0OrW8=; b=ODH6f/t3kB06Z+nH6qxvGuO6UO4xfAdUXZg2CI/Y4SoERdDaS9mHeNkyXCdp+HSBEf BqQWjG5glF8WBEY9uYmEQtRSfqGK/jIoKb8BqGM5A+vWTZrstbYGy8GQm4RGJpSs8pEk U8HabxoOrL08cUYTOr70fCd6lcw9R4d9vZCdvQAW6YVS6ZrsbWTXEzScM522Xm1Q2Jrm SdHyP1pgoQuJ09TsjKyTTUROrjzkBmJMvH9wtvzCjZpkcgNZjfFi3je36Q8i+yhoZK9W yWCdrwX8z1rA9eXJT/7RqEi5MyDzkC+Dtcm2JgryNeDdbCr3QAMW7OY61BZeLCYNBLam Disw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=/JhRtqyidVMi3rWP/EOBhwgF+IMAdh7T+kQmFL0OrW8=; b=fps725r9DoBIYf0MHLTzlZezZy0fYA6H1DDR/7J8HLTusoykQTd5WTuJp1V4emSuOk 9i/90myFz3rUOFH+TyYIcYGo+IEoNslQ6SN6n4PmWqodH9gznrLoWsHR3xcQaoTnYOt0 3ZwPrlyp1RiXyZ/koxL9ei92SccvvGzX6+4PjlYs9Ph7BNJbUEv+Z8McyuOtiu2Z9EIG R6tH/rU4FGeOc04GKAYNYccMuWuHh3n6zsPRkwPy911CJ4otgaJei4CzA/n4yuozjMy+ IFE2W8hJ2/wRXyFn6BQjwvc8oYu2AZw5ChXoPvPqQWF6tfHvHSbm35T+325BP3CS2prE WoBg== X-Gm-Message-State: AJIora8hKU/9jE69qLuZ3d8tIIuHM22xy4qjeR0+i5ftH2nVkWihtv4Y /D8X+C8rzUeqVSfXkJoQVHoO7oF17yzVfEP9uurKT1m5jbL26nvA9u+kBUCqzpkPqqTR4z6bIlO ObmFIXhvS8HdeHlWuk3ctCqfgo1QzXVdzUPxRQEAAwUQP0auckG4Teiqi3sFhxRoCgKPAO0+mog LrmxLUxFmBts2zgnj6ePiVwcbKJz6p3BncvjlGPNuqdszmwhWdeEAldhw+dCL39j4J1qQwUC8yQ 4gfmvxxXfUetuHqUbP1bl26ioIsEQfWn45Tgg== X-Google-Smtp-Source: AGRyM1s+BMYWeO5QwFoxtzwz78yGjZJEiAY/OEz76VUHzIJNA4ABHArmb+5Ti1DPrkHiGl/iSSfaTw== X-Received: by 2002:a17:90a:7ac4:b0:1ef:a606:4974 with SMTP id b4-20020a17090a7ac400b001efa6064974mr16819750pjl.51.1657810427088; Thu, 14 Jul 2022 07:53:47 -0700 (PDT) Received: from localhost.localdomain ([114.143.109.178]) by smtp.gmail.com with ESMTPSA id c128-20020a624e86000000b00525231e15ccsm1774751pfb.113.2022.07.14.07.53.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Jul 2022 07:53:45 -0700 (PDT) Subject: Re: replacing role-level NOINHERIT with a grant-level option To: Robert Haas Cc: Nathan Bossart , Joe Conway , Tom Lane , "Bossart, Nathan" , Stephen Frost , PostgreSQL-development References: <20220701025830.GA369935@nathanxps13> <12e2f0cb-08ff-c65f-d31e-76cea1af70ec@joeconway.com> <442d7887-645d-0e31-e971-7a8dc8952d2f@joeconway.com> <20220701211225.GA418166@nathanxps13> <20220702221635.GB1044460@nathanxps13> <20220703171742.GB1048244@nathanxps13> From: tushar Message-ID: <8210e573-c861-fe45-302b-56d7352aae48@enterprisedb.com> Date: Thu, 14 Jul 2022 20:23:37 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/11/22 11:01 PM, Robert Haas wrote: > Oops. Here is a rebased version of v3 which aims to fix this bug. I found one issue where pg_upgrade is failing PG v14.4 , create these below objects create user u1 with superuser; create user u3; create group g2 with user  u1; now try to perform pg_upgrade from v16(w/patch), it is failing with these messages [edb@centos7tushar bin]$ tail -10 dc2/pg_upgrade_output.d/20220714T195919.494/log/pg_upgrade_utility.log -- -- CREATE ROLE "u3"; CREATE ROLE ALTER ROLE "u3" WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS; ALTER ROLE GRANT "g2" TO "u1" WITH  GRANTED BY "edb"; psql:dc2/pg_upgrade_output.d/20220714T195919.494/dump/pg_upgrade_dump_globals.sql:47: ERROR:  syntax error at or near "BY" LINE 1: GRANT "g2" TO "u1" WITH  GRANTED BY "edb";                                          ^ This issue is not reproducible on PG v16 (without patch). -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company