Search Postgresql Archives

Re: Advice on logging strategy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 11, 2018 at 6:27 AM Mike Martin <redtux1@xxxxxxxxx> 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?

One option is to convert to using COPY...FROM STDIN rather than prepared INSERTs.

Another is to create a user specifically for bulk population, and do a 'ALTER USER bulk_load SET log_statement=none` to override the global log_statement setting.

Cheers,

Jeff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux