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 1nHrTJ-0005TT-AL for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Feb 2022 18:13:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nHrTI-0002L3-6Q for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Feb 2022 18:13:40 +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 1nHrTH-0002KA-RK for pgsql-hackers@lists.postgresql.org; Wed, 09 Feb 2022 18:13:39 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nHrTF-00026L-2n for pgsql-hackers@postgresql.org; Wed, 09 Feb 2022 18:13:38 +0000 Received: by mail-pj1-x102f.google.com with SMTP id r64-20020a17090a43c600b001b8854e682eso3054917pjg.0 for ; Wed, 09 Feb 2022 10:13:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=lZ9uKp2NSy6wBnWu6GBd1c+PfpHmRwrU6z6HffrDl/8=; b=nKAYTf3yvvhU8MlxyTbhmY5Z4ivw7cR4LtHJuPf9dny0X7/S9CTWLpDi7DAW9FeFBd DEldYBmQPFXfZBIID6UCCQQKa5cksy4GEnWrcs5ijKi1D4kqNxvHgOXEBZOqi3Z/EVPB 42uJF9VHXs/yIDIIwhjS6mAKqrvbA/fm4b6Adaulxe1S6LCsDSMD8wfwhdIc2ZPF4DBu Mfo2KzUnrRE6m2yieEMVRvh9Kb2p8r20whBH+AGhAxx+EaNWnW3hLVeWBizlCqAo2u6Z eF0jx2TC98KlgElH4VSqu0vyULyzdsJfl7AONJoAjjqBJiZ4N9XHO/n2ZyQ5XUpiDFpF 1OAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=lZ9uKp2NSy6wBnWu6GBd1c+PfpHmRwrU6z6HffrDl/8=; b=QJJFsUZRlVroUnUXKh/CtSgn2qQFaMGnGBiGo4yBwyf6bL9ZmYJYxZgPByLaWZJzKa C27b1e793NaMBvE3dWC2AR0pLzcCVrGnHZ616A26IYaFZp7S6Hte5+nV1Cp321WOZtRr kNHI0y7Q06iYNgwRwM2z9ccK6kJUA+3DrpbOMExpKoJdoYZfr0qr87pcjVIx3zySJlSB AWM5wmDl5dDA0q1Dbf+9haNpEljY+5rJ79aCuDn8fcIQkzHphLH5SuMV7Zz9u0SRlSXE DCm3KBEwJ1YGBy4WhdNeUmCH8zRaVBr8jd3xWaTT9pjK5IaQ1lsvQ+8xO7rirx6PSqn0 lJPw== X-Gm-Message-State: AOAM531e5eac1OewET6UDCstQQwkYRXOOWcPU4FxcX3Lv2crYdWYbRxB 8ZCzAwwrICkA8+evq7/nnNw= X-Google-Smtp-Source: ABdhPJwuxEkSgfYduk7VRV9O/JH0U+1DDLNSv3O/DVRpY36ICXau881WPNzT+pmngbMJxXU9ObE0BQ== X-Received: by 2002:a17:90a:4588:: with SMTP id v8mr4823258pjg.114.1644430416103; Wed, 09 Feb 2022 10:13:36 -0800 (PST) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id s42sm21590973pfg.146.2022.02.09.10.13.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 10:13:35 -0800 (PST) Date: Wed, 9 Feb 2022 10:13:33 -0800 From: Nathan Bossart To: Robert Haas Cc: Joe Conway , Joshua Brindle , Tom Lane , "Bossart, Nathan" , Stephen Frost , PostgreSQL-development Subject: Re: [PATCH v2] use has_privs_for_role for predefined roles Message-ID: <20220209181333.GD1627503@nathanxps13> References: <730520.1644168290@sss.pgh.pa.us> <80af9ba7-ec24-9134-8fd9-00bf13f5c494@joeconway.com> <18eab9b6-1f77-72b2-83d3-1856c17f3fcb@joeconway.com> <0b1b6cfb-d752-28f6-7ccb-993998be0189@joeconway.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Feb 08, 2022 at 10:54:50PM -0500, Robert Haas wrote: > On Tue, Feb 8, 2022 at 7:38 PM Joe Conway wrote: >> If we were to start all over again with this feature my vote would be to >> do things differently than we have done. I would not have called them >> predefined roles, and I would have used attributes of roles (e.g. make >> rolsuper into a bitmap rather than a boolean) rather than role >> membership to implement them. But I didn't find time to participate in >> the original discussion or review/write the code, so I have little room >> to complain. > > Yep, fair. I kind of like the predefined role concept myself. I find > it sort of elegant, mostly because I think it scales better than a > bitmask, which can run out of bits surprisingly rapidly. But opinions > can vary, of course. I do wonder if users find the differences between predefined roles and role attributes confusing. INHERIT doesn't govern role attributes, but it will govern predefined roles when this patch is applied. Maybe the role attribute system should eventually be deprecated in favor of using predefined roles for everything. Or perhaps the predefined roles should be converted to role attributes. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com