Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uogqr-008Iov-Sq for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Aug 2025 11:19:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uogqo-007XwN-EE for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Aug 2025 11:19:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uogqo-007XwF-69 for pgsql-bugs@lists.postgresql.org; Wed, 20 Aug 2025 11:19:30 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uogql-000pqU-2h for pgsql-bugs@lists.postgresql.org; Wed, 20 Aug 2025 11:19:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version :References:Reply-To:Message-ID:Subject:To:Sender:From:Date:Cc:Content-ID: Content-Description; bh=ARk+bMfSX3LZ0eKuoLPNQkTmTFzfCv3dRSmudoQMipQ=; b=TvxoL /ma7nhU9s/3c2/ONqRXEYywsNQDgsAcVgm7xogebkGIhZe1l7VBhuRpmxUYsJ89svdzuCc789SPJg MXbEUxzvkEa/HOiFZYXkNnWUp/zkFGYEK7SB0MjSIoAQkOPfeCe2pY5wZbEuRFfWAehNVpnkzbIxS PN6hov+BYyEg=; Received: from depesz by depesz.com with local (Exim 4.96) (envelope-from ) id 1uogqj-00CaPq-1S; Wed, 20 Aug 2025 13:19:25 +0200 Date: Wed, 20 Aug 2025 13:19:25 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: jose.morcillo.valenciano@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19025: PostgreSQL log is not rotated Message-ID: Reply-To: depesz@depesz.com References: <19025-2b475b7d74db87f1@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <19025-2b475b7d74db87f1@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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