Re: How To Log User Name + Database? - Mailing list pgsql-general

From Tom Lane
Subject Re: How To Log User Name + Database?
Date
Msg-id 9838.976123476@sss.pgh.pa.us
Whole thread Raw
In response to How To Log User Name + Database?  (Ed Loehr <eloehr@austin.rr.com>)
Responses Re: How To Log User Name + Database?  (Larry Rosenman <ler@lerctr.org>)
RE: How To Log User Name + Database?  ("Edmar Wiggers" <edmar@brasmap.com>)
List pgsql-general
Ed Loehr <eloehr@austin.rr.com> writes:
> Can anyone tell me how to log the db user name and db name to the server
> log?  Is this possible at present?

Offhand I don't think that happens at the moment, but it does seem like
it'd be a good idea to have a backend do an elog(DEBUG) at startup that
mentions its database name and user name.  Assuming you have logging of
timestamps/PIDs turned on, that would be enough to correlate later log
messages with a user name.

Comments anyone?

            regards, tom lane

pgsql-general by date:

Previous
From: Ed Loehr
Date:
Subject: How To Log User Name + Database?
Next
From: Larry Rosenman
Date:
Subject: Re: How To Log User Name + Database?