public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Albrecht Dreß <[email protected]>
Cc: [email protected]
Subject: Re: Q: limit the length of log file entries?
Date: Wed, 03 Sep 2025 15:07:08 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
Albrecht =?iso-8859-1?b?RHJl3w==?= <[email protected]> writes:
> I have a PL/PGsql DB function 'addval(_id text, _data bytea) RETURNS VOID'. When a broken bytea is passed as 2nd parameter, something like
> albrecht@test FEHLER: ungültige hexadezimale Ziffer: »r« bei Zeichen 28
> albrecht@test ANWEISUNG: SELECT FROM addval('hopp', '\xbroken')
> is printed in the log file. This is fine and very helpful in this case, but I have a “friendly user” who transmitted a broken hex string of ~100 KBytes as second parameter, resulting in a log line of this size which is not really readable and when done frequently quickly fills the logs.
There isn't any provision for limiting the length of source queries
quoted in the log. Had your user sent the bytea value as a query
parameter, then log_parameter_max_length[_on_error] would have
applied, but this looks like the value was just inline in the query.
regards, tom lane
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Q: limit the length of log file entries?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox