Q: limit the length of log file entries?
От
Albrecht Dreß
Тема
Q: limit the length of log file entries?
Дата
Msg-id
YJI7DQ4I.3WYAVH2R.IWZZPYNU@AP5TCLKO.ZBA47T5B.KHWCFARS
Список
Дерево обсуждения
Q: limit the length of log file entries? Albrecht Dreß <albrecht.dress@posteo.de>
Re: Q: limit the length of log file entries? Adrian Klaver <adrian.klaver@aklaver.com>
Re: Q: limit the length of log file entries? Albrecht Dreß <albrecht.dress@posteo.de>
Re: Q: limit the length of log file entries? Tom Lane <tgl@sss.pgh.pa.us>
Re: Q: limit the length of log file entries? Albrecht Dreß <albrecht.dress@posteo.de>
Re: Q: limit the length of log file entries? Adrian Klaver <adrian.klaver@aklaver.com>
Re: Q: limit the length of log file entries? Adrian Klaver <adrian.klaver@aklaver.com>
Re: Q: limit the length of log file entries? Albrecht Dreß <albrecht.dress@posteo.de>
Re: Q: limit the length of log file entries? Adrian Klaver <adrian.klaver@aklaver.com>
Hi all,
I wonder if it would be possible to limit the length of individual log lines being written to the log file.
Background:
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.
The log settings are, inter alia
log_parameter_max_length = 256
log_parameter_max_length_on_error = 256
log_error_verbosity = TERSE
but seem to have not the desired effect in this case.
I use PostgreSQL version 17.6-1.pgdg13+1 on Debian Trixie.
Thanks in advance for any help,
Albrecht.В списке pgsql-general по дате отправления