Re: Separate log_destination, user specific

Поиск
Список
Период
Сортировка
От Holger Jakobs
Тема Re: Separate log_destination, user specific
Дата
Msg-id d42de064-3f13-32c0-a02e-a5a0c3792ff5@jakobs.com
обсуждение исходный текст
Ответ на Re: Separate log_destination, user specific  (Paul Smith <paul@pscs.co.uk>)
Ответы Re: Separate log_destination, user specific  (Daulat <daulat.dba@gmail.com>)
Список pgsql-admin
Am 25.01.22 um 11:57 schrieb Paul Smith:
On 25/01/2022 10:48, Daulat wrote:
Is it possible to set a separate log_destination for some users  in Postgres? 
As I know all actions are recorded under the directory specified by log_destination. 

But I want to create a separate log file for DBA users to log their actions.
Is any third party or free ware tool available to accomplish this task ?


Could you set PostgreSQL to log to Syslog, and then set up filters in rsyslog?
(I've not done it, but it sounds like it may work)

Using syslog is not advisable. Qutoe from https://www.postgresql.org/docs/current/runtime-config-logging.html

The logging collector is designed to never lose messages. This means that in case of extremely high load, server processes could be blocked while trying to send additional log messages when the collector has fallen behind. In contrast, syslog prefers to drop messages if it cannot write them, which means it may fail to log some messages in such cases but it will not block the rest of the system.

Do you really want to lose messages??

Вложения

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

Предыдущее
От: Paul Smith
Дата:
Сообщение: Re: Separate log_destination, user specific
Следующее
От: Daulat
Дата:
Сообщение: Re: Separate log_destination, user specific