Re: Truncate logs by max_log_size

From: Kirill Gavrilov <diphantxm(at)gmail(dot)com>
To: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: Kirill Reshke <reshkekirill(at)gmail(dot)com>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Euler Taveira <euler(at)eulerto(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Truncate logs by max_log_size
Date: 2025-01-31 10:46:37
Message-ID: CA+E0NR7XD3wpts2GEFpZpO-M8kj9f8pTrhnAKvq5n4xjtLgLKg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 2, 2024 at 1:09 PM Jim Jones <jim(dot)jones(at)uni-muenster(dot)de> wrote:

>
>
> On 29.11.24 21:57, Kirill Gavrilov wrote:
> > Same thing applies to log_parameter_max_length, for example.
> >
> > postgres=# set log_parameter_max_length = '1foo';
> > ERROR: invalid value for parameter "log_parameter_max_length": "1foo"
> > HINT: Valid units for this parameter are "B", "kB", "MB", "GB", and
> "TB".
> > postgres=# set log_parameter_max_length = '1TB';
> > ERROR: invalid value for parameter "log_parameter_max_length": "1TB"
> > HINT: Value exceeds integer range.
> >
> > I think we can leave it as is.
>
> I see. So I guess it is out of scope to change this message here.
>
> Small nitpicks:
>
> 1) The indentation of the comment at postgresql.conf.sample is a little
> bit off
>
> #max_log_size = 0 # max size of logged statement
> # 0 disables the feature
>
> IMHO it looks better like this:
>
> #max_log_size = 0 # max size of logged statement
> # 0 disables the feature
>
>
> 2) You introduced a trailing whitespace at L34 (Not critical :))
>
> + Zero disables the setting.
>
> It happens to me all the time, so I usually try to apply my patches in a
> clean branch just to make sure I didn't miss anything.
>
> Other than that, I have nothing more to add at this point.
>
> Thanks
>
> --
> Jim
>
>
Sorry for the long silence. I fixed the indentation and a trailing
whitespace. Should look fine now.

Attachment Content-Type Size
V6-0001-parameter-max_log_size-to-truncate-logs.patch application/octet-stream 9.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Koterov 2025-01-31 11:30:35 hash_search_with_hash_value is high in "perf top" on a replica
Previous Message Matthias van de Meent 2025-01-31 10:38:57 Re: why there is not VACUUM FULL CONCURRENTLY?