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 1uoMbl-002nzE-3Q for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Aug 2025 13:42:38 +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 1uoMbi-00BmO8-9l for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Aug 2025 13:42:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uoMbh-00BmNq-IS for pgsql-bugs@lists.postgresql.org; Tue, 19 Aug 2025 13:42:34 +0000 Received: from fhigh-a1-smtp.messagingengine.com ([103.168.172.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uoMbe-000idr-2O for pgsql-bugs@lists.postgresql.org; Tue, 19 Aug 2025 13:42:33 +0000 Received: from phl-compute-07.internal (phl-compute-07.internal [10.202.2.47]) by mailfhigh.phl.internal (Postfix) with ESMTP id A532314002D2; Tue, 19 Aug 2025 09:42:28 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-07.internal (MEProxy); Tue, 19 Aug 2025 09:42:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eulerto.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1755610948; x=1755697348; bh=hLeLb2GOXgEUe6jc0cERA0q85/DPqG4wgwkGRMxWI9E=; b= XTkzcXAFwremTjCutWzqAt1XSm31ZrXdsub38MJ8nuscKb2dAwUw+lKnmW0xGsp8 EfDkPkbW7LAjAVu+uthsCx1sLaGhiItO8FcsdYXOx14wgwU/iNoEfAycM07z7R7N UBpneRLoBGeZS5vGSeizvKhPHxJ88LYVbXjC8ETAESeHhChE5mLXw3WZ9oWXa06s UA/2rqaAT+vLOAK/+NJ0YMMk9wdnXwcG3TZvw8bWLzFKGnnz1c/skXTx9lIODTLA mUk2rsjiBO42CBJjH9TRytuekzbjhJHobsAahu02D4wBxXnQsp3Vz4yyzOnBy3Al CHIK5psblHybYLeFIy67+Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1755610948; x=1755697348; bh=h LeLb2GOXgEUe6jc0cERA0q85/DPqG4wgwkGRMxWI9E=; b=lUPNPl79kI88zu/Jv BtmbOlI2wGKWX9Bsy0RGgJnyo00pRPWwNwDRN1acjbYCHVPmje/vLcNnZsxZDXV7 A37OJ3nRdxxIKwF5+7XDk+7pk05xpwhfU2G7kUGRCLjRi7/datZxd3ybl7Zqv8mQ AZWM8Rim9ml6jOap1inCZ/GMsiQ7pXRqOU6MpumgnumKzKSQB+ufyqKLv1wsNvZj 8/nXmvFPs4NvJyGBrHy73Fa8qXJzHd/mtCpw2cNjpzZDUB+e3Y2iEtaLgpfhrzZy ugr/Y8HQmFFSEv5m7kMbCUtLN/bZECOu9dtdL1JUUJLx7lY9maRRVb4zktQt+m7E QxMMw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduheehieefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefoggffhffvkfgjfhfutgfgsehtjeertd ertddtnecuhfhrohhmpedfgfhulhgvrhcuvfgrvhgvihhrrgdfuceovghulhgvrhesvghu lhgvrhhtohdrtghomheqnecuggftrfgrthhtvghrnhepkedvkedugfffleeiffelvdekhe ejvdeuvedtjeeijeeklefftddufeeukeeklefgnecuffhomhgrihhnpegvnhhtvghrphhr ihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegvuhhlvghrsegvuhhlvghrthhordgtohhmpdhnsggprhgtphhtthhopedv pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjohhsvgdrmhhorhgtihhllhhord hvrghlvghntghirghnohesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdgs uhhgsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0c21471d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id DF3B3182007A; Tue, 19 Aug 2025 09:42:27 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 X-ThreadId: ALqh-EoJ2Y0R Date: Tue, 19 Aug 2025 10:41:59 -0300 From: "Euler Taveira" To: jose.morcillo.valenciano@gmail.com, pgsql-bugs@lists.postgresql.org Message-Id: <34ba519e-74e6-44a9-bd87-30e4bffbff4e@app.fastmail.com> In-Reply-To: <19025-2b475b7d74db87f1@postgresql.org> References: <19025-2b475b7d74db87f1@postgresql.org> Subject: Re: BUG #19025: PostgreSQL log is not rotated Content-Type: text/plain Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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/