pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Moench-Tegeder <cmt@burggraben.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: Database connection log
Date: Thu, 14 Jun 2018 16:51:58 +0200
Message-ID: <20180614145157.GA99890@elch.exwg.net> (raw)
In-Reply-To: <CAB_W-NM7QUrLLHKY0=EzKDKwP+HFmOW-wZ76dbwE004Lbaw+mw@mail.gmail.com>
References: <CAB_W-NM7QUrLLHKY0=EzKDKwP+HFmOW-wZ76dbwE004Lbaw+mw@mail.gmail.com>

## 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




view thread (3+ messages)  latest in thread

Message-ID: <20180614145157.GA99890@elch.exwg.net>
Permalink:  ../20180614145157.GA99890@elch.exwg.net/
Also on:    postgresql.org/message-id/20180614145157.GA99890@elch.exwg.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: cmt@burggraben.net
  Subject: Re: Database connection log
  In-Reply-To: <20180614145157.GA99890@elch.exwg.net>
  References: <CAB_W-NM7QUrLLHKY0=EzKDKwP+HFmOW-wZ76dbwE004Lbaw+mw@mail.gmail.com> <20180614145157.GA99890@elch.exwg.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox