Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cP3V3-00034w-Mz for pgsql-admin@arkaria.postgresql.org; Thu, 05 Jan 2017 08:34:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cP3V2-0003GG-Qr for pgsql-admin@arkaria.postgresql.org; Thu, 05 Jan 2017 08:34:16 +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 1cP3TH-0001Lw-Ci for pgsql-admin@postgresql.org; Thu, 05 Jan 2017 08:32:27 +0000 Received: from edmmai02.een.elster.de ([217.237.175.35]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.84_2) (envelope-from ) id 1cP3TA-0006Px-Cg for pgsql-admin@postgresql.org; Thu, 05 Jan 2017 08:32:25 +0000 X-IronPort-AV: E=Sophos;i="5.33,320,1477954800"; d="scan'208";a="4354069" Received: from edmzrf02.een.elster.de ([192.168.20.13]) by edmmai02.een.elster.de with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jan 2017 09:32:16 +0100 Received: from [10.200.128.41] (unknown [10.200.128.41]) by edmzrf02.een.elster.de (Postfix) with ESMTPSA id A37E03E10DF for ; Thu, 5 Jan 2017 09:32:16 +0100 (CET) Subject: Re: Displaying ProcessList to Users To: pgsql-admin@postgresql.org References: <4a01458f-d8fd-c4f4-b7ed-57cb552e2e3c@elster.de> From: "Gunnar \"Nick\" Bluth" X-Enigmail-Draft-Status: N1110 Message-ID: <273d27f1-5f94-191d-3ca0-7c2cba003645@elster.de> Date: Thu, 5 Jan 2017 09:32:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -7.4 (-------) 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 Am 05.01.2017 um 09:12 schrieb Günce Kaya: > Hi Gunnar, Hi Günce, > When I select pg_stat_activity table, I can see only a row to my user > but I have executed lots of queries. I can only see latest executed > query to me. > > Is there any way to list users with whole queries that executed before > by users? Well, you'd need full statement logging to achieve that. And the information will be in the log, not the DB: https://www.postgresql.org/docs/current/static/runtime-config-logging.html#GUC-LOG-STATEMENT Cheers, Nick > > Regards, > > Gunce Kaya > > 2017-01-05 10:59 GMT+03:00 Gunnar "Nick" Bluth > >: > > Am 05.01.2017 um 08:55 schrieb Günce Kaya: > > Hi All, > > Hi Günce, > > > > I'm curious about can I display or list users who execute which queries > > in databases. > > > > Any help would be appreciated. > > Have a look at pg_stat_activity. > > Regards, > -- > Gunnar "Nick" Bluth > DBA ELSTER > > Tel: +49 911/991-4665 > Mobil: +49 172/8853339 > > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org > ) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin > > > > > > -- > Gunce Kaya -- Gunnar "Nick" Bluth DBA ELSTER Tel: +49 911/991-4665 Mobil: +49 172/8853339 -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin