Re: Limiting line size in Postgres log files - Mailing list pgsql-admin

From Ron Johnson
Subject Re: Limiting line size in Postgres log files
Date
Msg-id CANzqJaBgLsPVsrV=Z7EjV4KuRxNri+UMPwOowo2TtxSHMXVVEA@mail.gmail.com
Whole thread Raw
In response to Limiting line size in Postgres log files  (Priancka Chatz <pc9926@gmail.com>)
List pgsql-admin
On Wed, Jun 26, 2024 at 7:02 AM Priancka Chatz <pc9926@gmail.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

pgsql-admin by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Limiting line size in Postgres log files
Next
From: Ron Johnson
Date:
Subject: Incorrect syntax when restoring a single table