Re: Truncate logs by max_log_size

Fujii Masao <masao.fujii@gmail.com>

From: Fujii Masao <masao.fujii@gmail.com>
To: Jim Jones <jim.jones@uni-muenster.de>
Cc: Maxym Kharchenko <maxymkharchenko@gmail.com>, Kirill Reshke <reshkekirill@gmail.com>, Álvaro Herrera <alvherre@kurilemu.de>, Fujii Masao <masao.fujii@oss.nttdata.com>, Kirill Gavrilov <diphantxm@gmail.com>, "Andrey M. Borodin" <x4mmm@yandex-team.ru>, Euler Taveira <euler@eulerto.com>, pgsql-hackers@lists.postgresql.org
Date: 2026-07-03T04:24:21Z
Lists: pgsql-hackers

Attachments

On Fri, Jul 3, 2026 at 9:56 AM Fujii Masao <masao.fujii@gmail.com> wrote:
> Thanks for the review! I've pushed the patch.

The buildfarm member prion reported the failure [1].

It looks like the failure occurs because prion runs with
log_error_verbosity = verbose, which inserts the SQLSTATE between
"LOG:" and the message text. The log_statement_max_length = 0 test
expected "statement:" to appear immediately after "LOG:", so it failed
even though the server correctly logged an empty statement body.

The attached patch fixes the test.

Regards,

[1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2026-07-03%2002%3A23%3A06

-- 
Fujii Masao

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix log_statement_max_length test with verbose logs

  2. Add log_statement_max_length GUC to limit logged statement text

  3. Improve user control over truncation of logged bind-parameter values.