Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fTTbm-0006HH-V3 for pgsql-general@arkaria.postgresql.org; Thu, 14 Jun 2018 14:52:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fTTbl-0002Fs-IS for pgsql-general@arkaria.postgresql.org; Thu, 14 Jun 2018 14:52:17 +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.89) (envelope-from ) id 1fTTbl-0002Fg-6i for pgsql-general@lists.postgresql.org; Thu, 14 Jun 2018 14:52:17 +0000 Received: from smtp.burggraben.net ([2a01:4f8:140:50a2::3:1]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fTTbh-000302-NW for pgsql-general@lists.postgresql.org; Thu, 14 Jun 2018 14:52:15 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp.burggraben.net (Postfix) with ESMTP id 43C9C6002EE for ; Thu, 14 Jun 2018 16:52:10 +0200 (CEST) X-Spam-Scanned: by amavisd-new at exwg.net Received: from smtp.burggraben.net ([127.0.0.1]) by localhost (ns.burggraben.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zU4I2ATJLNnc for ; Thu, 14 Jun 2018 16:51:58 +0200 (CEST) Received: from elch.exwg.net (elch.exwg.net [IPv6:2001:470:7120:1:127b:44ff:fe4f:148d]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "elch.exwg.net", Issuer "Christoph Moench-Tegeder" (verified OK)) by smtp.burggraben.net (Postfix) with ESMTPS for ; Thu, 14 Jun 2018 16:51:58 +0200 (CEST) Received: by elch.exwg.net (Postfix, from userid 1000) id 6821B27328; Thu, 14 Jun 2018 16:51:58 +0200 (CEST) Date: Thu, 14 Jun 2018 16:51:58 +0200 From: Christoph Moench-Tegeder To: pgsql-general@lists.postgresql.org Subject: Re: Database connection log Message-ID: <20180614145157.GA99890@elch.exwg.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ## Tiffany Thang (tiffanythang@gmail.com): > Does PostgreSQL keep a log of client connections to the database like > Oracle's listener.log? I would like to extract information such as how many > connections are made to the database daily, the IP addresses they > originated from and the schemas they are connected to. Would it be possible > to extract the above information in PostgreSQL? Set "log_connections" to "on": https://www.postgresql.org/docs/10/static/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT Regards, Christoph -- Spare Space