From: | "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: How to maintain the csv log files in pg_log directory only for past 30 days |
Date: | 2018-09-30 09:50:29 |
Message-ID: | 20180930095029.c2oriwqn6ikl6mpk@hjp.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2018-09-29 07:12:32 -0700, Adrian Klaver wrote:
> On 9/28/18 7:05 PM, Raghavendra Rao J S V wrote:
> > Hope you all are recommending below settings to maintain only max 30
> > days logs in *pg_log* directory. Please correct me if I am wrong.
>
> Well it would actually be 31 days as:
>
> http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html
>
> %d
> Replaced by the day of the month as a decimal number [01,31]. [ tm_mday]
Additionally, the log file for the 31st of a month is usually only
overwritten after 61 days.
> Not sure if that matters or not.
It may or may not. Personally I prefer to use find -mtime (or logrotate,
or cleandir, or keepfree, ...) to avoid the irregularities of the
Gregorian calendar.
hp
--
_ | Peter J. Holzer | we build much bigger, better disasters now
|_|_) | | because we have much more sophisticated
| | | hjp(at)hjp(dot)at | management tools.
__/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
From | Date | Subject | |
---|---|---|---|
Next Message | Torsten Förtsch | 2018-09-30 11:32:27 | vacuum question |
Previous Message | Charles Clavadetscher (SwissPUG) | 2018-09-30 08:34:39 | Re: Postgres trigger side-effect is occurring out of order with row-level security select policy |