Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddBAR-0001Ep-Mw for pgsql-admin@arkaria.postgresql.org; Thu, 03 Aug 2017 08:07:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ddBAR-0004VU-7k for pgsql-admin@arkaria.postgresql.org; Thu, 03 Aug 2017 08:07:39 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ddB8c-0001I4-4i for pgsql-admin@postgresql.org; Thu, 03 Aug 2017 08:05:46 +0000 Received: from mail-oln040092253072.outbound.protection.outlook.com ([40.92.253.72] helo=APC01-SG2-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ddB8Y-00039W-4T for pgsql-admin@postgresql.org; Thu, 03 Aug 2017 08:05:44 +0000 Received: from PU1APC01FT022.eop-APC01.prod.protection.outlook.com (10.152.252.55) by PU1APC01HT222.eop-APC01.prod.protection.outlook.com (10.152.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1282.16; Thu, 3 Aug 2017 08:05:38 +0000 Received: from MA1PR01MB0748.INDPRD01.PROD.OUTLOOK.COM (10.152.252.55) by PU1APC01FT022.mail.protection.outlook.com (10.152.253.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1282.16 via Frontend Transport; Thu, 3 Aug 2017 08:05:38 +0000 Received: from MA1PR01MB0748.INDPRD01.PROD.OUTLOOK.COM ([10.174.58.9]) by MA1PR01MB0748.INDPRD01.PROD.OUTLOOK.COM ([10.174.58.9]) with mapi id 15.01.1282.023; Thu, 3 Aug 2017 08:05:38 +0000 From: amandeep singh To: Naveen Kumar CC: pgsql-admin Subject: Re: Terminate connections using non-superuser Thread-Topic: [ADMIN] Terminate connections using non-superuser Thread-Index: AQHTC4vorOYAHTJYrkuEAy7MEQQ4s6JxA1aAgAE2yP8= Date: Thu, 3 Aug 2017 08:05:38 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:F25731AE2C59D8AA04FC4B524FFF9513F2D02614D2AD2B020A9CBA1381E47815;UpperCasedChecksum:99A21B94338957593834BC3E2EED17CA4D7DFE34EC8B224072F3C103DEFA1C14;SizeAsReceived:7332;Count:46 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [BgJ4Jyytz8XY3a0HDf1J+2qW9UL7LYsbo0ch0rbxgyQ=] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;PU1APC01HT222;7:7nGfIHpWzWhDt/ZuFfiqX3mEQ4aM6JOHiaG2/8832/mGDLbiL6FDGV+5Rm/hDHmXCHVayJYvWvUo806PBU42ybmUOB8O0DBe6KDK1qJClqCM6nn8y05A9IPhuXrr5V/X7CH4DB0PHp16gR49W00yN8TBOYSdOuN2H8eZ9ySXaf2qGNIV7ObYWk02f3BkjTi0b5YOobxaePQi87VGz73L3eahCtoDqz5XHhCQh9zZN0kwPlK07kOLwTgj/XugTDksau2/w1fzIErKdmV/MahsuUp530T9uBZ0KsYdJg4FGXpq/wVp4sVuL9vmyRG0bJCgFljtOwXJa/cI8i/FxYWK9UscUWWi3TDLBvBg+9xAKGA6Yh/n+pJh8vTz61SkDiNz5zY4HH38UZJSkVKAFN6fb896x+tVo5CsTXJTTIQDJRN/PP5HZ6d2U1+8dX06MH7Uxl8OoTDQk7Q4j0tWEC6p3wSo/ECHvOxgwAx45L2SeW97hooIZePPJdrzwJD+fSkVWkfDo88/GMxW26qkPHN3KVbUAwlykL3umkLtvi8P5m0LQjj7iwURVhIBMqZwGozQKT0ut9T+7kSPAWu68ckEBQYBLivAM+Jt2t9NsfWABBKR5T8ebvwdOz4tDodVWsNcqv4LvwnuvHCiVtiG1cQ/kXCznAGRDvG67wmGuoFJcjDCgDmvn8Wuzi53B+/FtxhEUzRXQP2PIgQVp9NihPQyMD32JHFQHSBMTP6Gz3cfZJRMjciqFIeuqc8gvUXwc25DQPpBT8AZbJoOLbBMfuFMjQ== x-incomingheadercount: 46 x-eopattributedmessage: 0 x-forefront-antispam-report: EFV:NLI;SFV:NSPM;SFS:(7070007)(98901004);DIR:OUT;SFP:1901;SCL:1;SRVR:PU1APC01HT222;H:MA1PR01MB0748.INDPRD01.PROD.OUTLOOK.COM;FPR:;SPF:None;LANG:en; x-ms-office365-filtering-correlation-id: c33a13cc-a119-4896-a44d-08d4da466d3f x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322377)(1603101448)(1601125374)(1701031045)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:PU1APC01HT222; x-ms-traffictypediagnostic: PU1APC01HT222: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(444000031);SRVR:PU1APC01HT222;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:PU1APC01HT222; x-forefront-prvs: 03883BD916 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_MA1PR01MB074816CC6D93B840ED36B2E280B10MA1PR01MB0748INDP_" MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Aug 2017 08:05:38.0910 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1APC01HT222 List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --_000_MA1PR01MB074816CC6D93B840ED36B2E280B10MA1PR01MB0748INDP_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Naveen pg_terminate_backend is working now with the solution suggested by you but = I am still searching for the solution to view the queries executed by any o= ther user using pg_stat_activity . @scott: In my case I can't change the name of the default function/view as = it is needed with the same name to run using tool. Thanks both of you for your response. Thanks and Regards: Amandeep Singh ________________________________ From: Naveen Kumar Sent: Wednesday, August 2, 2017 6:15:27 PM To: amandeep singh Cc: pgsql-admin Subject: Re: [ADMIN] Terminate connections using non-superuser Yes, non-superuser can do this. but user should have privilege to this. GRANT pg_signal_backend TO user; Thanks & Regards, Naveen Kumar .M, Sr. PostgreSQL Database Administrator, Mobile: 7755929449. My attitude will always be based on how you treat me. On Wed, Aug 2, 2017 at 6:06 PM, amandeep singh > wrote: Hi All I have a requirement where I need a non-superuser who can view (pg_stat_act= ivity) and terminate (pg_terminate_backend) connections of other users. Is = it possible to give such privileges to non-superuser? Postgres Version :PostgreSQL9.6 Thanks and Regards: Amandeep Singh --_000_MA1PR01MB074816CC6D93B840ED36B2E280B10MA1PR01MB0748INDP_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi Naveen 


pg_terminate_backend is working now with the solution suggested by you&n= bsp;but I am still searching for the solution to view the queries exec= uted by any other user using pg_stat_activity .


@scott: In my case I can't change the name of the default function/view = as it is needed with the same name to run using tool.


Thanks both of you for your response.


Thanks and Regards:
Amandeep Singh

From: Naveen Kumar <nave= enchowdaryon@gmail.com>
Sent: Wednesday, August 2, 2017 6:15:27 PM
To: amandeep singh
Cc: pgsql-admin
Subject: Re: [ADMIN] Terminate connections using non-superuser
 
Yes, non-superuser can do this. but user should have privi= lege to this.

GRANT pg_signal_backend TO user; 

Thanks & Regards,
Naveen Kumar .M,
Sr. PostgreSQL Database Admi= nistrator,
Mobile: 7755929449.
My attitude will always be based on how you treat me. <= br>



--_000_MA1PR01MB074816CC6D93B840ED36B2E280B10MA1PR01MB0748INDP_--