From: | Ed Loehr <eloehr(at)austin(dot)rr(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pggeneral <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How To Log User Name + Database? |
Date: | 2000-12-06 17:59:17 |
Message-ID: | 3A2E7E75.4EF64A10@austin.rr.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane wrote:
>
> Ed Loehr <eloehr(at)austin(dot)rr(dot)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?
That'd be an improvement. Considering the case where you have many users
and many dbs, with log lines co-mingled. Would it be better to
(optionally) allow the db name and user name to be logged on each line?
That way, you wouldn't have to do the visual correlation with a line
possibly tens or hundreds of lines earlier in the log. It might also
simplify log processing scripts a bit.
Regards,
Ed Loehr
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-12-06 18:01:20 | Re: How To Log User Name + Database? |
Previous Message | Francis Solomon | 2000-12-06 17:55:04 | RE: apache .htaccess / postgresql module |