Re: postgres access log file - Mailing list pgsql-admin

From Andreas Schmitz
Subject Re: postgres access log file
Date
Msg-id 200302281443.01342.a.schmitz@cityweb.de
Whole thread Raw
In response to postgres access log file  ("Nathalie Boulos" <nathalieboulos@hotmail.com>)
List pgsql-admin
On Friday 28 February 2003 11:31, Nathalie Boulos wrote:
> Hello all,
>
> I was wondering if there is a log file where are logged connection to a
> postgresql database per user and per date.
>
> Or do i have to specify a table and insert rows in it each time a user logs
> in and out?
>
> Regards
>
> Nathalie
>

hi,

I have this in the postgresql.conf

log_connections = true
log_pid = true
log_statement = false
log_duration = true
log_timestamp = true

it outputs this to the log

Feb 26 17:27:46 postgres2 postgres[12416]: [ID 553393 local0.info] [11] LOG:
connection received: host=193.189.226.86 port=33102
Feb 26 17:27:46 postgres2 postgres[12416]: [ID 553393 local0.info] [12] LOG:
connection authorized: user=postgres database=newsdb
Feb 26 17:35:07 postgres2 postgres[12418]: [ID 553393 local0.info] [11] LOG:
connection received: host=193.189.226.86 port=33104
Feb 26 17:35:07 postgres2 postgres[12418]: [ID 553393 local0.info] [12] LOG:
connection authorized: user=postgres database=newsdb


regards

-andreas

--
Andreas Schmitz - Phone +49 201 8501 318
Cityweb-Technik-Service-Gesellschaft mbH
Friedrichstr. 12 - Fax +49 201 8501 104
45128 Essen - email a.schmitz@cityweb.de


pgsql-admin by date:

Previous
From: Karel Zak
Date:
Subject: Re: GRANT access on table fields
Next
From: "Fouad Fezzi"
Date:
Subject: Re: GRANT access on table fields