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

From Fujii Masao
Subject Re: Truncate logs by max_log_size
Date
Msg-id CAHGQGwFYxCVmL4Bvm61bUW+WUi+YXFHzXo9hFEoSgYT1=fU-+w@mail.gmail.com
Whole thread
In response to Re: Truncate logs by max_log_size  (Maxym Kharchenko <maxymkharchenko@gmail.com>)
Responses Re: Truncate logs by max_log_size
List pgsql-hackers
On Sat, Apr 18, 2026 at 2:04 AM Maxym Kharchenko
<maxymkharchenko@gmail.com> wrote:
>
> Hello Fujii-san,
>
> There seems to be an inconsistency in the current patch. When a statement has errors (for example, when it hits a
tablethat does not exist), the full statement is still being logged. 
>
> Similar parameter: `log_parameter_max_length` has a companion `log_parameter_max_length_on_error` to handle this case
(commit:0b34e7d307e6, https://github.com/postgres/postgres/commit/0b34e7d307e6a142ee94800e6d5f3e73449eeffd). 
>
> Should the same treatment be added for `log_statement_max_length`?

I think extending log_statement_max_length, or adding something like
log_statement_max_length_on_error, would be a good idea to cover statements
logged on error. However, I think the current patch is good as it stands,
so I'd recommend pursuing that as a separate patch after the current one
is committed.

Regards,

--
Fujii Masao



pgsql-hackers by date:

Previous
From: SATYANARAYANA NARLAPURAM
Date:
Subject: Re: [BUG]: WHERE CURRENT OF cursor fail on tables that have virtual generated columns
Next
From: Richard Guo
Date:
Subject: Re: Clean up remove_rel_from_query() after self-join elimination commit