Re: Truncate logs by max_log_size - Mailing list pgsql-hackers

From Jim Jones
Subject Re: Truncate logs by max_log_size
Date
Msg-id 0514f233-5f77-469b-88c3-e8eb7487afc2@uni-muenster.de
Whole thread Raw
In response to Re: Truncate logs by max_log_size  (Kirill Reshke <reshkekirill@gmail.com>)
List pgsql-hackers
Hi Kirill

On 20/03/2026 18:33, Kirill Reshke wrote:
> We discussed this patch off-list with Andrey @x4mmm in sight of
> CVE-2026-2006. Looks like this patch is not vulnerable, and its use of
> pg_mbcliplen are correct.

Thanks for checking!

I spent some time revisiting this patch today and realised that it only
applied truncation in exec_simple_query. I believe the original intent
of this feature was to cover other paths as well, so I added the same
logic in exec_execute_message (which handles log_statement logging for
the extended query protocol), and in exec_parse_message and
exec_bind_message (which log statement text when
log_min_duration_statement fires).

v9 attached.

Thoughts on this approach?

Best, Jim



Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Changing the state of data checksums in a running cluster
Next
From: Daniel Gustafsson
Date:
Subject: Re: Changing the state of data checksums in a running cluster