Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Date
Msg-id 32297.1419350852@sss.pgh.pa.us
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes  (Stephen Frost <sfrost@snowman.net>)
Responses Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> I'd have gone with just adding more bool columns as needed.

> I don't think I was the only one concerned that adding a bunch of new
> columns would bloat the size of pg_authid and the C structure behind it,
> but I'm not remembering offhand who else considered it.

Lessee, as of 9.4 pg_authid required 76 bytes per row, plus row header
overhead that'd have probably pushed it to 104 bytes per row (more if
you had non-null rolpassword or rolvaliduntil).  If we add as many as 20
more booleans we'd be at 124 bytes per row, whereas with this approach
we'd have, well, 104 bytes per row.  I'm not seeing much benefit to
justify such a drastic change of approach.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Next
From: Alvaro Herrera
Date:
Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes