Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tBDbk-002XtZ-99 for pgsql-general@arkaria.postgresql.org; Wed, 13 Nov 2024 13:40:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tBDbh-00Ecdj-De for pgsql-general@arkaria.postgresql.org; Wed, 13 Nov 2024 13:40:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tBDbg-00EcdL-Eq for pgsql-general@lists.postgresql.org; Wed, 13 Nov 2024 13:40:29 +0000 Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tBDbZ-001j7T-2x for pgsql-general@postgresql.org; Wed, 13 Nov 2024 13:40:25 +0000 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.phl.internal (Postfix) with ESMTP id 99F0B1380699; Wed, 13 Nov 2024 08:40:19 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Wed, 13 Nov 2024 08:40:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1731505219; x=1731591619; bh=u ppdkzWTb+YwJKsaY94Kg9ZZUmwE6VIMzlTkx1sQwFE=; b=MfQ40xKbarmVfF5xe hZ8IEgezuYmi0uD+uh5U9nDHqx3+2BgnJ661OgOisZngMtt7olOhAL3VUSf2hjSg aInJ2oPp7C8fVSnq4v5MaK6mFAAeUAems9x0Sqs8whzUJiK5++MK6+mkHECKDkZ0 Qb7cwASQDdDmGl/kajWzsxJTOqANPwMagdLXwjoBoev7FzTDj7I3o70oyBdbsAnN YT8EaYYs76eMSm+H3LH1r6OOQ6HXH93XJrqjBE58RzX7EbNae5AHBVkQ+WA4AmHW t/e340d0UWh8gahZHwBcTfprjVS8lbVcnZ4jYl/sWaR02p66IH0nUFPH1x6J/jzs 2vwBQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrvddtgdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecu hfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrd hnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfej jefhgfeiueeukeejkeffgfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprh hishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdpnhgspghrtg hpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepugguvghvihgvnhhn vgesghhmrghilhdrtghomhdprhgtphhtthhopehvihhjrgihkhhumhgrrhhjrghinhdrgh hithhhuhgssehgmhgrihhlrdgtohhmpdhrtghpthhtohepkhgrrghrvgesjhgrshhonhhi tgdrughkpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlhesphhoshhtghhrvghsqh hlrdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Nov 2024 08:40:18 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1731505216; bh=oeQ02OdYh/wIA3bycJkalKBSjwhM2tq4+MuCJ/J5VOM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=m+JpfdtbegIo1hByiunAj4v3KJwrfce4Ct7Ax699egbE6gbFXfHwyd6n2z7OWBNSo 39gmKObpiUApJ9c4uh71JZ64jsfEIyRZB6eAGhrz9J4zoAFdKDG2O8seK8jiZ3ItcZ z3A/rCHE1OM1tqq0aa0HqOZLgz8gMA3vyGxCtpP2sb1gUAevfD4fZVo7z1jxomGzIA BUJJkYNwnxIxoDuZ+t0BCnpuTUU2e8c6vJmBJjRH/Xr4TpR1qEVl97B8oOjASdvQ3d /CmouGgx1C+r+J47Pic0xekqPgM4JWei+WCEyPTZTY45Nl/zu4UryxGsvI4+5AWp0J SrY6m4O07VznQ== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 36ED79B; Wed, 13 Nov 2024 14:40:16 +0100 (CET) Date: Wed, 13 Nov 2024 14:40:16 +0100 From: Alvaro Herrera To: Kaare Rasmussen Cc: Dominique Devienne , Vijaykumar Jain , pgsql-general Subject: Re: Fwd: A million users Message-ID: <202411131340.63qb3y2wsinb@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <193258b6791.ada07c1761341.959628411447004614@jasonic.dk> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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/