Re: Fwd: Log file

From: Igor Korot <ikorot01(at)gmail(dot)com>
To: laurenz(dot)albe(at)cybertec(dot)at
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Fwd: Log file
Date: 2018-11-06 18:06:14
Message-ID: CA+FnnTwnr16Hb4oPmYU0m8sjN3oMxJoO2WtyfWCnSZ53LYPqVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-odbc

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(dot)albe(at)cybertec(dot)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
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Nolan 2018-11-06 18:27:02 Re: why select count(*) consumes wal logs
Previous Message Ravi Krishna 2018-11-06 17:57:31 Re: why select count(*) consumes wal logs

Browse pgsql-odbc by date

  From Date Subject
Next Message Ron 2018-11-06 20:35:22 Re: Fwd: Log file
Previous Message Clemens Ladisch 2018-11-06 17:48:49 Re: Does the psqlodbc driver support asynchronous queries?