From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes |
Date: | 2014-12-23 16:22:09 |
Message-ID: | 20141223162209.GH3062@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
> > * Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)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.
I suppose. I didn't consider it to be a terribly drastic change but
rather simply using a better representation for a mostly-internal bit of
data. It also lended itself pretty nicely to maniuplation (at least,
imv, the code is a lot cleaner with the bitmask, but it's not a huge
deal). Guess I had been expecting concerns to be raised around adding
many more bytes where there wouldn't have been.
Thanks,
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-12-23 16:34:09 | Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes |
Previous Message | Stephen Frost | 2014-12-23 16:16:31 | Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2014-12-23 16:29:43 | Re: Proposal: two new role attributes and/or capabilities? |
Previous Message | José Luis Tallón | 2014-12-23 16:20:19 | Proposal: two new role attributes and/or capabilities? |