From: Euler Taveira <euler@eulerto.com>
To: jose.morcillo.valenciano@gmail.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19025: PostgreSQL log is not rotated
Date: Tue, 19 Aug 2025 10:41:59 -0300
Message-ID: <34ba519e-74e6-44a9-bd87-30e4bffbff4e@app.fastmail.com> (raw)
In-Reply-To: <19025-2b475b7d74db87f1@postgresql.org>
References: <19025-2b475b7d74db87f1@postgresql.org>
On Tue, Aug 19, 2025, at 7:21 AM, PG Bug reporting form wrote:
> We have configured our log rotating policy as follows:
>
> 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
>
Did the log say something? I'm wondering if the log_directory has the right
permission.
Are you sure that you reload and/or restart the service after changing these
parameters? Most of them require a reload but logging_collector requires a
restart.
You enable log_truncate_on_rotation but there won't be another log file with
the same name. Hence, no truncate will occur. The truncation only occurs due to
time-based rotation.
You are using an outdated version (16.2). The current minor version is 16.10.
You are ignoring 1.5 year of fixes. A minor version doesn't add new features;
it only adds bug fixes and security fixes.
--
Euler Taveira
EDB https://www.enterprisedb.com/
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: pgsql-bugs@postgresql.org
Cc: euler@eulerto.com, jose.morcillo.valenciano@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19025: PostgreSQL log is not rotated
In-Reply-To: <34ba519e-74e6-44a9-bd87-30e4bffbff4e@app.fastmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox