Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8OJZ-0000cH-Cf for pgsql-admin@arkaria.postgresql.org; Thu, 02 Jun 2016 08:49: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 1b8OJY-0006qz-Qb for pgsql-admin@arkaria.postgresql.org; Thu, 02 Jun 2016 08:49:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b8OHq-0002ZT-Ez for pgsql-admin@postgresql.org; Thu, 02 Jun 2016 08:47:31 +0000 Received: from nm39-vm2.bullet.mail.ir2.yahoo.com ([212.82.97.161]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b8OHl-0005e3-PM for pgsql-admin@postgresql.org; Thu, 02 Jun 2016 08:47:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1464857243; bh=6UlPM9tVxGgPu9ceBXM1xoL3HvceYAA0P+kO296Fiaw=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=s/gZ0e5C2jXq4nfotnsgpl8cnaqa3AVm8GwDjnhNKocjKLSSPsG8d6h3i8gff8g6LVWSobJ1jMvgds3nsNMTGKAaWDlls7aDZaqKLdESobMw+ZGnNJ0XzdGlRqaw6IlFL49lFcW9q37JS2PXBzjfxoWHGuU3RLKOe47ImSSL5xsYsHowhPQe3IPc8/Tlnkxx6STQ75dyYMfn8heffsRjS+mjYwZDrrqAcS6SF5P2v9+DxInNwomVnr7SxK1QSzjD+heKz4y20TSV6SEFMvcdaykGeybtV0gUVVk7IZgyWUs1hYizkjZLQgDeNgQFeMzRPvzYlVH9ztKO0gVvyV0IeA== Received: from [212.82.98.126] by nm39.bullet.mail.ir2.yahoo.com with NNFMP; 02 Jun 2016 08:47:23 -0000 Received: from [212.82.98.83] by tm19.bullet.mail.ir2.yahoo.com with NNFMP; 02 Jun 2016 08:47:23 -0000 Received: from [127.0.0.1] by omp1020.mail.ir2.yahoo.com with NNFMP; 02 Jun 2016 08:47:23 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 771559.62767.bm@omp1020.mail.ir2.yahoo.com X-YMail-OSG: mnRripMVM1k_sLzqxdsJvRVdgStw7RrgiZm2soZSPGAx7sPBCe9ReK5u.VI2B8p h5CCoAKrsM1VGZSOnfZaymjJNYTwL0qZ6jigi6wTMQMpUHmqKD10c3y21L2JUz4tiBrmB3d2o4qb A39AkZFxDFZw2EJfCfmYs0vdzIFpz4ridcpDqXbQn2OxgljJ.Ymr5gPEVi7AzCRM09yp4NWtwQZk pEhcyl7zDeGuKTp4buRQ_LY7SP3eU4.c_vcuW32JLniyST5kTprCicxL2ts2bQn7mZ1.swyE9VNM EnQzCpKlLEq.p34NH0ZrrsVEA8BnFf.bwdzX1oeYckXLuFIygK71OT4KvujiEuWki0ZbmwuyfLhI X4e_hNI4xT0ASW_73tdTccPiVgICbFSF5G.gyMtigap9c0W.gXEUoDe72G22GQJ07R_sYHJz.sFk o9eSD7Bs6tA_nZPA07JFjYlpQWokZki3APqZQhUsvHGqArzx8xXEWExZ17j6pXTNkLJkCA7pRNUi 8SZC72AJfUdkyHIOQ Received: from jws11175.mail.ir2.yahoo.com by sendmailws108.mail.ir2.yahoo.com; Thu, 02 Jun 2016 08:47:23 +0000; 1464857243.289 Date: Thu, 2 Jun 2016 08:47:04 +0000 (UTC) From: Glyn Astill Reply-To: Glyn Astill To: Dhandapani Shanmugam , "pgsql-admin@postgresql.org" Message-ID: <2019574206.5819817.1464857224506.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: References: Subject: Re: user logging info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Length: 1065 X-Pg-Spam-Score: -2.7 (--) 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 > From: Dhandapani Shanmugam >To: pgsql-admin@postgresql.org >Sent: Thursday, 2 June 2016, 7:21 >Subject: [ADMIN] user logging info > > > >Hi All, > > >Good Day! > > >Please clarify me on below points :) > > >-Can we see user connections on any system tables(active + past) in postgreSQL, Please share me the SQL if it is possible. > Can you clarify what you want to see here? You can see the current and last queries of connections with "SELECT * FROM pg_stat_activity". If you want auditing or logging of all activity then depending on what you need it's possible with triggers or an extension like pg_audit. > >-.I assume postgresql.conf can be modified so that user connections are logged in a log file. > Yes turn on log_connections and log_disconnections, see the "what to log" section here: https://www.postgresql.org/docs/current/static/runtime-config-logging.html >>Is this best approach or how can we do to check for the user connection details? any advise is really helpful. Thanks in Advance > > >-Dhandapani > > -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin