Re: Advice on logging strategy - Mailing list pgsql-general

From Mike Martin
Subject Re: Advice on logging strategy
Date
Msg-id CAOwYNKZbPtM1NQJRTdORM=CGbhTNMExQnibYO2vtoeeNs92dyQ@mail.gmail.com
Whole thread Raw
In response to Re: Advice on logging strategy  (Rob Sargent <robjsargent@gmail.com>)
List pgsql-general
I suppose the ideal would be to log the prepared statement once and detail only if error rather than one per execution

On Thu, 11 Oct 2018 at 11:33, Rob Sargent <robjsargent@gmail.com> wrote:


> On Oct 11, 2018, at 4:26 AM, Mike Martin <redtux1@gmail.com> wrote:
>
> I have a question on logging strategy
>
> I have loggin set to
> log_statement = 'all' on a network database with logging set to csv so I can import it to a logging table
>
> However the database is populated via a nightly routine downloading data via REST APIusing prepared statements
>
> This results in enormous log files which take ages to import using copy becuase each execute statement is logged with the parameters chosen
>
> Is there any way around this?
>
> I cant find any way to filter dml statements
>
> thanks       
>
Do you want all the log lines in you logging table?
There was a thread yesterday (10.Oct.2018) on COPY which mention the possibility of multiple processes COPYing to same table.

pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: Advice on logging strategy
Next
From: Bryce Pepper
Date:
Subject: RE: RHEL 7 (systemd) reboot