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 1k0wMF-0004iz-KP for pgsql-general@arkaria.postgresql.org; Thu, 30 Jul 2020 00:23:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k0wME-00052U-K8 for pgsql-general@arkaria.postgresql.org; Thu, 30 Jul 2020 00:23:38 +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 1k0wME-0004yY-BW for pgsql-general@lists.postgresql.org; Thu, 30 Jul 2020 00:23:38 +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 1k0wMC-0000iH-Fi for pgsql-general@postgresql.org; Thu, 30 Jul 2020 00:23:37 +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 06U0NYCo1344585; Wed, 29 Jul 2020 20:23:34 -0400 From: Tom Lane To: Steve Baldwin cc: pgsql-general Subject: Re: Transaction prevention In-reply-to: References: Comments: In-reply-to Steve Baldwin message dated "Thu, 30 Jul 2020 09:56:35 +1000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1344583.1596068614.1@sss.pgh.pa.us> Date: Wed, 29 Jul 2020 20:23:34 -0400 Message-ID: <1344584.1596068614@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Steve Baldwin writes: > If I have a user that is restricted to select access (only) on a single > table, is there any way to prevent that user from starting a transaction? No, but maybe setting statement_timeout and/or idle_in_transaction_session_timeout for that user would be helpful (cf ALTER USER ... SET ...). regards, tom lane