RE: How To Log User Name + Database?

Поиск
Список
Период
Сортировка
От Edmar Wiggers
Тема RE: How To Log User Name + Database?
Дата
Msg-id NEBBIAKDCDHFGJMLHCKIMEOKCBAA.edmar@brasmap.com
обсуждение исходный текст
Ответ на Re: How To Log User Name + Database?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
> 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.

Since each connection generates a backend process, I think the timestamp/PID
would be enough to relate log messages to an initial one saying: PID x
starting (database y, user z).

Maybe you could even include the source IP address, or whether it's an tcp
or a unix domain socket connection. Or maybe this is useless, dunno.


В списке pgsql-general по дате отправления:

Предыдущее
От: Zachary Beane
Дата:
Сообщение: Re: MySQL-esque sec_to_time() function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How To Log User Name + Database?