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 1oYfXg-0004Hd-JD for pgsql-general@arkaria.postgresql.org; Thu, 15 Sep 2022 03:27: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 1oYfXd-0003Qd-Ik for pgsql-general@arkaria.postgresql.org; Thu, 15 Sep 2022 03:27:53 +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 1oYfXd-0003QU-8j for pgsql-general@lists.postgresql.org; Thu, 15 Sep 2022 03:27:53 +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 1oYfXY-0005DB-87 for pgsql-general@lists.postgresql.org; Thu, 15 Sep 2022 03:27:49 +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 28F3RkZu3092213; Wed, 14 Sep 2022 23:27:46 -0400 From: Tom Lane To: Mladen Gogala cc: pgsql-general@lists.postgresql.org Subject: Re: Is it possible to stop sessions killing eachother when they all authorize as the same role? In-reply-to: References: <10F360BB-3149-45E6-BFFE-10B9AE31F1A6@yugabyte.com> <2F078227-5EEF-4553-89FF-046A6AF12F25@yugabyte.com> <1883844.1663044542@sss.pgh.pa.us> Comments: In-reply-to Mladen Gogala message dated "Wed, 14 Sep 2022 22:27:04 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3092211.1663212466.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Wed, 14 Sep 2022 23:27:46 -0400 Message-ID: <3092212.1663212466@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Mladen Gogala writes: > Tom, I did the same thing on 14.5, and it behaves as Bryn alleges: Looks to me like you made the same mistake as Bryn. You revoked the permission in the postgres database: > postgres=# select proacl from pg_proc where proname = ^^^^^^^^ > 'pg_terminate_backend'; >         proacl > ----------------------- >  {postgres=X/postgres} > (1 row) > mgogala@umajor ~]$ psql -U scott > Password for user scott: psql (14.5) > Type "help" for help. > scott=> select pid from pg_stat_activity where ^^^^^ ... and here you're testing the permission in the "scott" database. regards, tom lane