Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y3RE3-0003nQ-Jp for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 15:18:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y3RE1-0002Fr-Hn for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Dec 2014 15:18:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y3RE0-0002F5-9A for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 15:18:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y3RDt-0000LN-3Y for pgsql-hackers@postgresql.org; Tue, 23 Dec 2014 15:18:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id sBNFI2ra031248; Tue, 23 Dec 2014 10:18:02 -0500 From: Tom Lane To: Alvaro Herrera cc: pgsql-hackers@postgresql.org Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes In-reply-to: References: Comments: In-reply-to Alvaro Herrera message dated "Tue, 23 Dec 2014 13:22:48 +0000" Date: Tue, 23 Dec 2014 10:18:02 -0500 Message-ID: <31247.1419347882@sss.pgh.pa.us> X-Pg-Spam-Score: 0.6 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Alvaro Herrera writes: > Use a bitmask to represent role attributes > The previous representation using a boolean column for each attribute > would not scale as well as we want to add further attributes. > Extra auxilliary functions are added to go along with this change, to > make up for the lost convenience of access of the old representation. I have to apologize for not having paid more attention, but ... is this *really* such a great idea? You've just broken any client-side code that looks directly at pg_authid. Moreover, I don't particularly buy the idea that this somehow insulates us from the compatibility costs of adding new role properties: you're still going to have to add columns to the pg_roles view, and adjust clients that look at that, every time. Replacing bool-column accesses with bitmask manipulation doesn't seem like it's a win on a micro-optimization level either, certainly not for SQL-level coding where you've probably made it two orders of magnitude more expensive. And lastly, what happens when you run out of bits in that bigint column? Again, I suppose I should have objected earlier, but I really seriously doubt that this is a good idea. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers