On 2024-Nov-13, Kaare Rasmussen wrote:
> Sorry if my original post was unclear, but I don't expect that there
> will be much more than perhaps a hundred roles. Each may have from a
> few up to a million users in them, though.
In Postgres, a user is a role. So if you have a hundred roles and a
million users that these roles are granted to, that means you'll have
100100 roles. (In the worst case, where you grant all one hundred roles
to each of the million users, you would end up with 100_000_000 rows in
pg_auth_member).
I would expect such a system to work mostly fine. It'll need memory for
the caches used to store contents of system catalogs. I think you
should test it out and see what happens. I haven't seen any published
_actual_ benchmarks on this point.
That said, having a million users is a bit strange. Do you want to give
each visitor to your website a unique Postgres role, or something like
that? I think this is unusual, but it should work.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/