Re: Limiting line size in Postgres log files

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Limiting line size in Postgres log files
Date: 2024-06-26 13:25:30
Message-ID: CANzqJaBgLsPVsrV=Z7EjV4KuRxNri+UMPwOowo2TtxSHMXVVEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Jun 26, 2024 at 7:02 AM Priancka Chatz <pc9926(at)gmail(dot)com> wrote:

> Hi Pgsql-Admins,
>
> Is there a way to set the max size of a line logged in Postgres log?
> Anything beyond a certain size/no-of-character should be logged only till
> the specified size and leave out the rest. I have an instance where the
> query statements are very long (more than 100MB) and I don't need the
> entire statement to be in my logfile.
>

That's deeply broken. Presumably you're loading external data; find a
different way of doing it, or disable log_statement.

> Lets say I need to log any statement only upto 10MB.
> Is this possible? Maybe a workaround?
>
>
> Thank you in advance,
> Priyanka C
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ron Johnson 2024-06-27 14:01:42 Incorrect syntax when restoring a single table
Previous Message Laurenz Albe 2024-06-26 12:19:33 Re: Limiting line size in Postgres log files