Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQ9b2-0001RL-Az for pgsql-sql@arkaria.postgresql.org; Fri, 04 Mar 2022 15:11:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nQ9b1-0005HN-0w for pgsql-sql@arkaria.postgresql.org; Fri, 04 Mar 2022 15:11:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQ9b0-0005Fm-OT for pgsql-sql@lists.postgresql.org; Fri, 04 Mar 2022 15:11:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQ9ay-0007MB-Kh for pgsql-sql@lists.postgresql.org; Fri, 04 Mar 2022 15:11:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 224FBoFd3852574; Fri, 4 Mar 2022 10:11:50 -0500 From: Tom Lane To: Kevin Tu cc: pgsql-sql@lists.postgresql.org Subject: Re: limits on the number of concurrent DBMS sessions per account In-reply-to: References: Comments: In-reply-to Kevin Tu message dated "Fri, 04 Mar 2022 10:07:57 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3852572.1646406710.1@sss.pgh.pa.us> Date: Fri, 04 Mar 2022 10:11:50 -0500 Message-ID: <3852573.1646406710@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Kevin Tu writes: > Let's say I have a user userA, does anyone know how to limit the number of > concurrent sessions for this user? ALTER USER joe CONNECTION LIMIT 42; regards, tom lane