From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Lewis <mlewis@entrata.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Web users as database users?
Date: Wed, 11 Mar 2020 11:25:20 -0400
Message-ID: <6223.1583940320@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHOFxGpS-_dGTCDkiBEE6M3AEkoSeLbrPTy8HM8kEEdHTktucA@mail.gmail.com>
References: <CAPjKuyVzvojzntx2MNMWEvuP3--z_8ZzDbdYrbvNmXkqUeLfhQ@mail.gmail.com>
<f5dbb11b-c041-cea6-766f-63c223c526f2@minerva.info>
<28CB89D3-194A-420F-868A-0AFC169EF7E5@gmail.com>
<16391.1568989132@sss.pgh.pa.us>
<CAHOFxGpS-_dGTCDkiBEE6M3AEkoSeLbrPTy8HM8kEEdHTktucA@mail.gmail.com>
Michael Lewis <mlewis@entrata.com> writes:
> On Fri, Sep 20, 2019 at 8:19 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> There is a restriction on how many distinct GRANTs you can
>> issue against any one object --- performance will get bad if the ACL
>> list gets too large.
> Any ballpark numbers here? Are we talking 50 or 8000?
More like the former. aclitems are 12 bytes each, so once you get
past ~100 items in an object's ACL list, the array is going to
get large enough to be subject to toasting, greatly increasing the
time to access it.
That's not even counting the question of whether scanning lots
of items to determine access privileges is expensive. The code
that deals with ACL lists isn't terribly well optimized.
I'm not aware that anyone's done formal performance testing,
but if you want to have a lot of roles in the system, my
expectation is that you'd be better off granting privileges
to a small number of group roles and then granting group
role membership as appropriate.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, mlewis@entrata.com
Subject: Re: Web users as database users?
In-Reply-To: <6223.1583940320@sss.pgh.pa.us>
References: <CAPjKuyVzvojzntx2MNMWEvuP3--z_8ZzDbdYrbvNmXkqUeLfhQ@mail.gmail.com> <f5dbb11b-c041-cea6-766f-63c223c526f2@minerva.info> <28CB89D3-194A-420F-868A-0AFC169EF7E5@gmail.com> <16391.1568989132@sss.pgh.pa.us> <CAHOFxGpS-_dGTCDkiBEE6M3AEkoSeLbrPTy8HM8kEEdHTktucA@mail.gmail.com> <6223.1583940320@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox