From: | Rahila Syed <rahilasyed90(at)gmail(dot)com> |
---|---|
To: | jose(dot)morcillo(dot)valenciano(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #19025: PostgreSQL log is not rotated |
Date: | 2025-08-19 20:30:28 |
Message-ID: | CAH2L28tgFTY=31T5EsyRPkC1YhVFER0GyHeN8qKb+1QGmgP5NA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi,
> logging_collector = on
> log_destination = 'stderr'
> log_directory = '/postgresql/16/log/cpdm-cluster86'
> log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
> log_rotation_age = 1d
> log_rotation_size = 250MB
> log_truncate_on_rotation = on
>
> But the log is 16GB and no rotation has happened:
>
> [PRO] $ ls -lh
> total 16G
> -rw-r--r-- 1 postgres postgres 16G Aug 19 12:16
> postgresql-2025-07-12_001207.log
>
>
> I have been searching any bug but I could not find it. Any ideas?
>
>
I haven't attempted to reproduce this yet. However, after reviewing the
code
and the comments in the postgresql.conf file,
it appears that this is possible when rotation is triggered by file size
and
log_truncation_on_rotation is 'on'
i.e logs may be appended to an existing file with the same name
instead of truncating the existing file.
This happens because truncation only occurs during time-based rotation.
Are you observing this behaviour when log_truncate_on_rotation is 'false' ?
Thank you,
Rahila Syed
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2025-08-20 05:00:01 | BUG #19026: ResourceOwnerForget can't find owner for invalid plancache |
Previous Message | Masahiko Sawada | 2025-08-19 18:04:23 | Re: TRAP: failed Assert("outerPlan != NULL") in postgres_fdw.c |