Re: Fwd: Log file - Mailing list pgsql-general

From Igor Korot
Subject Re: Fwd: Log file
Date
Msg-id CA+FnnTwnr16Hb4oPmYU0m8sjN3oMxJoO2WtyfWCnSZ53LYPqVg@mail.gmail.com
Whole thread Raw
In response to Re: Fwd: Log file  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: Fwd: Log file
List pgsql-general
Hi, guys,
For some reason this reply was in my "Spam" folder (gmail service).
I guess moving to the new mailer service is not completely safe for "Spam".

So replying now - apologies to be late.

On Wed, Oct 31, 2018 at 2:00 AM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
>
> Igor Korot wrote:
> > Now is there a command to flush the log - delete the content of it?
>
> No, managing the logs is outside of PostgreSQL's responsibility.
>
> But it shouldn't be a problem to do this outside the database.
> Of course you could write a funtion in PostgreSQL that uses one
> of the "untrusted" procedural languages to do it for you.

Ok.
I guess I will have to write such function.

>
> > All I'm looking for in the log are DDL commands - CREATE/ALTER/DELETE ones.
>
> You mean DROP, right?

Yes, sorry.

>
> You can set "log_statement = 'ddl'" for that.

That's what I did.
But now I need to find a way to read the log file by the regular user
and not the "postgres" one.

Thank you.

>
> Yours,
> Laurenz Albe
> --
> Cybertec | https://www.cybertec-postgresql.com
>


pgsql-general by date:

Previous
From: Ravi Krishna
Date:
Subject: Re: why select count(*) consumes wal logs
Next
From: Michael Nolan
Date:
Subject: Re: why select count(*) consumes wal logs