Re: BUG #19025: PostgreSQL log is not rotated - Mailing list pgsql-bugs

From hubert depesz lubaczewski
Subject Re: BUG #19025: PostgreSQL log is not rotated
Date
Msg-id aKWvPeFfTMP-4d7Z@depesz.com
Whole thread Raw
In response to BUG #19025: PostgreSQL log is not rotated  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Tue, Aug 19, 2025 at 10:21:28AM +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      19025
> Logged by:          José Antonio Morcillo Valenciano
> Email address:      jose.morcillo.valenciano@gmail.com
> PostgreSQL version: 16.2
> Operating system:   Red Hat Enterpr Linux 5.14.0-427.35.1.el9_4.x86_64
> Description:        
> 
> Hi folks!
> 
> 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:

Please connect to the db, and check what are values of these settings
*inside* db.

You can do it by doing:

SELECT
    name,
    setting,
    source,
    sourcefile,
    sourceline
FROM
    pg_settings
WHERE
    name IN = ANY
('{logging_collector,log_destination,log_directory,log_filename,log_rotation_age,log_rotation_size,log_truncate_on_rotation}'::text[]);

Best regards,

depesz




pgsql-bugs by date:

Previous
From: shveta malik
Date:
Subject: Re: Unexpected Standby Shutdown on sync_replication_slots change
Next
From: Dilip Kumar
Date:
Subject: Re: BUG #19026: ResourceOwnerForget can't find owner for invalid plancache