public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kirill Reshke <[email protected]>
To: Kirill Gavrilov <[email protected]>
Cc: Jim Jones <[email protected]>
Cc: Andrey M. Borodin <[email protected]>
Cc: Euler Taveira <[email protected]>
Cc: [email protected]
Subject: Re: Truncate logs by max_log_size
Date: Mon, 25 Nov 2024 21:52:17 +0500
Message-ID: <CALdSSPiq+x9pRVYvYtddTQsL8=ZMvob+vSv5mHEXbe0aoPWGig@mail.gmail.com> (raw)
In-Reply-To: <CA+E0NR4=J-pgqEAV2weymygGmk1ePym45m2AcGyi2hpa9xRvBg@mail.gmail.com>
References: <CA+E0NR4S+NC6+QHyY_vUuQZMzLhKqczMx-jJVqtjAxF6+=JwAA@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CA+E0NR4=J-pgqEAV2weymygGmk1ePym45m2AcGyi2hpa9xRvBg@mail.gmail.com>
On Tue, 1 Oct 2024 at 20:46, Kirill Gavrilov <[email protected]> wrote:
>
> On Tue, Oct 1, 2024 at 2:46 PM Jim Jones <[email protected]> wrote:
>>
>>
>> On 27.09.24 12:36, Andrey M. Borodin wrote:
>> > Consider max_log_size = 10Mb. The perspective might look very different.
>> > It’s not about WHERE anymore. It's a guard against heavy abuse.
>> >
>> > The feature looks very important for me.
>> I have the same opinion. As a fail safe it sounds very useful to me.
>>
>> Unfortunately, the patch does not apply:
>>
>> $ git apply
>> ~/patches/max_log_query/0001-parameter-max_log_size-to-truncate-logs.patch
>> -v
>> Checking patch src/backend/utils/error/elog.c...
>> error: while searching for:
>> char *Log_destination_string = NULL;
>> bool syslog_sequence_numbers = true;
>> bool syslog_split_messages = true;
>>
>> /* Processed form of backtrace_symbols GUC */
>> static char *backtrace_symbol_list;
>>
>> error: patch failed: src/backend/utils/error/elog.c:114
>> error: src/backend/utils/error/elog.c: patch does not apply
>> Checking patch src/backend/utils/misc/guc_tables.c...
>> Hunk #1 succeeded at 3714 (offset 247 lines).
>> Checking patch src/backend/utils/misc/postgresql.conf.sample...
>> Hunk #1 succeeded at 615 (offset 23 lines).
>> Checking patch src/bin/pg_ctl/t/004_logrotate.pl...
>> error: while searching for:
>> check_log_pattern('csvlog', $new_current_logfiles, 'syntax error', $node);
>> check_log_pattern('jsonlog', $new_current_logfiles, 'syntax error', $node);
>>
>> $node->stop();
>>
>> done_testing();
>>
>> error: patch failed: src/bin/pg_ctl/t/004_logrotate.pl:135
>> error: src/bin/pg_ctl/t/004_logrotate.pl: patch does not apply
>> Checking patch src/include/utils/elog.h...
>> Hunk #1 succeeded at 502 (offset 1 line).
>>
>> Does it truncate only single queries or also a transaction with many
>> statements?
>>
>> Thanks!
>>
>> Best, Jim
>
>
> My apologies, attached patch should work on master branch.
> It truncates single queries and a statement in transaction that occurred an error.
>
Hello! Please deliver the most recent patch version and fix the issues
Jim identified [0] as the current commitfest draws to a close.
Do not forget to include both parts of this patch (This was actually
developed off-list, and we are now using this on our cloud PostgreSQL
distribution on versions 12–17).
[0] https://www.postgresql.org/message-id/35096a36-04d4-480b-a7cd-a2d8151fb737%40uni-muenster.de
--
Best regards,
Kirill Reshke
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Truncate logs by max_log_size
In-Reply-To: <CALdSSPiq+x9pRVYvYtddTQsL8=ZMvob+vSv5mHEXbe0aoPWGig@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox