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 1tedRN-00Ekx2-6S for pgsql-general@arkaria.postgresql.org; Sun, 02 Feb 2025 17:07:26 +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 1tedRM-007kGx-0H for pgsql-general@arkaria.postgresql.org; Sun, 02 Feb 2025 17:07:24 +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 1tedRK-007kGp-M0 for pgsql-general@lists.postgresql.org; Sun, 02 Feb 2025 17:07:23 +0000 Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tedRG-002tdZ-1W for pgsql-general@lists.postgresql.org; Sun, 02 Feb 2025 17:07:22 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 58850114010D; Sun, 2 Feb 2025 12:07:16 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Sun, 02 Feb 2025 12:07:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.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=fm2; t=1738516036; x=1738602436; bh=HcUDPOqqOwnVLwDE0XrI1bFqqLswvM1oZGNXtZ6DdZI=; b= hFvc4WD/+UB53BRQq+DiPf/MVMY2uIrQxQ1xzb0L00768NEH2HVI8AA+LznT4edL 89fTsMiNIMVUJugXsXSUm1JZhA36jW/kggSEA2p82zd3jJjnYnjvj58MBRRsHhu6 CU2SZKxEt8J72Bd5iHpIfRRI2vu26nfLUwxI6VW+zFEpRRfcUkYCAc7E7FDRynMN 6MDL4C0eSyDK7madhkskH2Q+/hFZOJCuFGh447UcijSZQyL6qU7tEND8JerpuM1J rEOf08yB4In2pCl7pWoh8vyyMVlHT1PAgW+aEY2vAzBvO0iFvOK/fu5+kMoKdKpQ PmhahbhXq9d84m9aiw4QqQ== 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=1738516036; x=1738602436; bh=H cUDPOqqOwnVLwDE0XrI1bFqqLswvM1oZGNXtZ6DdZI=; b=LNnv4aDpYOqI6wxaZ t9sQLOuBOoRfG2WhNln65WGhUKcTLa3P55q2l3v15N5zWw670qjbeJbhxF22ZIam rpWf/GqN5OxjM2yx8e7VkBhfSPUZktdLKQ2hG9josxp00/vlSPEZ8ZPVCJ2A0Ls+ gC0dkBW0KYumOM3iR5KaiAFcdPKSLILaviqVoC3q4XKhZCbp0ztvnMrRiUYzTzt1 TcbH47ZJJh1lOhAeJsOpO0CPW6wXNgaAbBNNc+gOBiA1z7EapvjCdEXahu1M3tlr AhpzsJiLk0K153auiFSRaZ0HbpfQ2vMzF8dhChufuJedy5OhB5g7pxQjf3tdxv8G UDu8A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduhedvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtvdej necuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrh esrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepffelgeeifefgveduhedt hfekuedtffejveegffegjeevtdehgfduieetfeehjeehnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghk lhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtohepphgruhhlsghrihhnughushgrkeeksehgmhgrihhlrdgtohhmpdhrtghp thhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrd horhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 2 Feb 2025 12:07:15 -0500 (EST) Message-ID: Date: Sun, 2 Feb 2025 09:07:14 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Log retention query To: Paul Brindusa , pgsql-general@lists.postgresql.org References: <20250202082618.trv7vpxw3stkqqw4@hjp.at> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/2/25 04:12, Paul Brindusa wrote: > Good afternoon Peter, > > I had the exact same query as Junwang proposed. > > Was mega upset that I could not get the cronjobs to work, and from what > I can tell from @Laurenz's  response above we have the names of the logs > customised to posgtres-%d-%m-%y. Removing the logs after a week or month > does not since our retention policy is 6 months. > > The cron job was set from root and it did not remove the logs/ What OS and version of same? Do you get an error message from cron? Do you have MAILTO set up in cron? > > On 02/02/2025 08:26, Peter J. Holzer wrote: >> On 2025-01-28 13:40:42 +0000, Paul Brindusa wrote: >>> @Junwang apologies, I should have mentioned that  we've tried setting >>> up a >>> crontab and it has not worked. >> Then you have a cron problem and not a postgresql problem. >> >> What that problem is is impossible to say with the information you have >> given us. What was the exact crontab entry, and what did it do? (When >> describing a problem, always use positives, not negatives. "it did not >> work" is particularly useless, since there are a gazillion ways in which >> something could not do what you expected.) >> >>> Have you got something similar working? >> Yes. Cleaning up stuff is probably one of the most frequent uses of >> cron. >> >>          hp >> > > -- Adrian Klaver adrian.klaver@aklaver.com