Re: Fwd: A million users

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Kaare Rasmussen <kaare(at)jasonic(dot)dk>
Cc: Dominique Devienne <ddevienne(at)gmail(dot)com>, Vijaykumar Jain <vijaykumarjain(dot)github(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Fwd: A million users
Date: 2024-11-13 13:40:16
Message-ID: 202411131340.63qb3y2wsinb@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message celati Laurent 2024-11-13 14:58:21 Extract values from XML content
Previous Message Kaare Rasmussen 2024-11-13 12:41:53 Re: Fwd: A million users