Truncate log lines

From: Luis <luisico(at)gmail(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Truncate log lines
Date: 2015-11-03 14:13:17
Message-ID: CAM-gcbQqriv=nr=YFFmp5ytgW7HbiftLBANFB9C0GwHMGDC0LA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

I'm trying to tune a little bit postgresql logging parameters. I have
a doubt about the lines that are logged. I have some automatic logs
parsing in order to extract some information.

I'm logging some queries that take more than n seconds but I don't
really need to have the entire query logged with this duration is
exceeded.

The problem I have is that a very large queries serie can take a big
amount of disk space. The ideal possibility for my case would be
truncating the log line based on a bytes or number of characters
size.

I've not found any option to do this. My second option was trying to
do this in rsyslog when postgresql-to-syslog is enabled but I've not
been able to do it either.

Have anybody has this problem? Any suggestion to solve the problem?

Thanks

Browse pgsql-admin by date

  From Date Subject
Next Message Shih Théo 2015-11-04 09:30:52 postgres: archiver process failed on XXXXXXXX
Previous Message Vladimir Borodin 2015-11-03 09:51:22 Re: [ADMIN] Replication slots and isolation levels