From: | "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Log retention query |
Date: | 2025-02-02 19:57:13 |
Message-ID: | 20250202195713.do65y2ewc6vjk3r5@hjp.at |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2025-02-02 12:12:07 +0000, Paul Brindusa wrote:
> I had the exact same query as Junwang proposed.
Assuming that by "query" you mean the crontab entry:
Well, if if was *exactly* the same it's unlikely to work since you
probably don't have a directory literally called "/path/to/logs". If you
made the obvious substitution, it should work provided it runs with
appropriate privileges.
What is the output if you remove the «-exec rm {} \;» bit? What happens
if you reduce the mtime?
> 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.
Earlier you wrote that the pattern was actually
«postgresql-%Y-%m-%d.log». «find ... -name "*.log"» would find that but
of course not «posgtres-%d-%m-%y».
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Brindusa | 2025-02-02 20:04:09 | Re: Log retention query |
Previous Message | Adrian Klaver | 2025-02-02 17:07:14 | Re: Log retention query |