pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedDatabase connection log
3+ messages / 3 participants
[nested] [flat]
* Database connection log
@ 2018-06-14 14:48 Tiffany Thang <tiffanythang@gmail.com>
2018-06-14 14:51 ` Re: Database connection log Christoph Moench-Tegeder <cmt@burggraben.net>
2018-06-14 18:00 ` Re: Database connection log Pierre Timmermans <ptim007@yahoo.com>
0 siblings, 2 replies; 3+ messages in thread
From: Tiffany Thang @ 2018-06-14 14:48 UTC (permalink / raw)
To: pgsql-general
Hi,
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?
Thanks.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Database connection log
2018-06-14 14:48 Database connection log Tiffany Thang <tiffanythang@gmail.com>
@ 2018-06-14 14:51 ` Christoph Moench-Tegeder <cmt@burggraben.net>
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Moench-Tegeder @ 2018-06-14 14:51 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
## 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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Database connection log
2018-06-14 14:48 Database connection log Tiffany Thang <tiffanythang@gmail.com>
@ 2018-06-14 18:00 ` Pierre Timmermans <ptim007@yahoo.com>
1 sibling, 0 replies; 3+ messages in thread
From: Pierre Timmermans @ 2018-06-14 18:00 UTC (permalink / raw)
To: pgsql-general; Tiffany Thang <tiffanythang@gmail.com>
I believe that you can achieve what you want with the following configuration parameters: log_connections and log_line_prefix
PostgreSQL: Documentation: 10: 19.8. Error Reporting and Logging
|
|
|
| | |
|
|
|
| |
PostgreSQL: Documentation: 10: 19.8. Error Reporting and Logging
|
|
|
Regards, Pierre
On Thursday, June 14, 2018, 4:48:54 PM GMT+2, Tiffany Thang <tiffanythang@gmail.com> wrote:
Hi,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?
Thanks.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-06-14 18:00 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-06-14 14:48 Database connection log Tiffany Thang <tiffanythang@gmail.com>
2018-06-14 14:51 ` Christoph Moench-Tegeder <cmt@burggraben.net>
2018-06-14 18:00 ` Pierre Timmermans <ptim007@yahoo.com>
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