[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    Re: Separate log_destination, user specific
From:       Daulat <daulat.dba () gmail ! com>
Date:       2022-01-25 11:38:04
Message-ID: CALfOM6Ky=wdL_FKjyJX_5jxO=iqa1Wy_oyrubezz17ZFHyPaBA () mail ! gmail ! com
[Download RAW message or body]

Thanks All  !

I don't want to loss any messages. I just want to track the dba user ( some
users) actions and to generate a report.

On Tue, 25 Jan, 2022, 4:30 pm Holger Jakobs, <holger@jakobs.com> wrote:

> 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??
>

[Attachment #3 (text/html)]

<div dir="auto">Thanks All   !  <div dir="auto"><br></div><div dir="auto">I don&#39;t \
want to loss any messages. I just want to track the dba user ( some users) actions \
and to generate a report.  </div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Tue, 25 Jan, 2022, 4:30 pm Holger Jakobs, &lt;<a \
href="mailto:holger@jakobs.com">holger@jakobs.com</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">  
    
  
  <div>
    <div>Am 25.01.22 um 11:57 schrieb Paul
      Smith:<br>
    </div>
    <blockquote type="cite">
      
      <div>On 25/01/2022 10:48, Daulat wrote:<br>
      </div>
      <blockquote type="cite">
        
        <div dir="ltr">Is it possible to set a separate  <span \
style="background-color:transparent;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit">log_destination
  for some users   in Postgres?  </span>
          <div>As I know all actions are recorded under the
            directory  specified by  log_destination.  <br>
          </div>
          <div><br>
          </div>
          <div>But I want to create a separate log file for DBA users to
            log their actions.</div>
          <div>Is any third party or free ware tool available to
            accomplish this task ?</div>
        </div>
      </blockquote>
      <p><br>
      </p>
      <p>Could you set PostgreSQL to log to Syslog, and then set up
        filters in rsyslog?<br>
        (I&#39;ve not done it, but it sounds like it may work)<br>
      </p>
      <br>
    </blockquote>
    <p>Using syslog is not advisable. Qutoe from
      <a href="https://www.postgresql.org/docs/current/runtime-config-logging.html" \
target="_blank" rel="noreferrer">https://www.postgresql.org/docs/current/runtime-config-logging.html</a><br>
  </p>
    <p>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, <span>syslog</span> 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.</p>
    <p>Do you really want to lose messages??<br>
    </p>
  </div>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic