Re: How to maintain the csv log files in pg_log directory only forpast 30 days - Mailing list pgsql-general

From Francisco Olarte
Subject Re: How to maintain the csv log files in pg_log directory only forpast 30 days
Date
Msg-id CA+bJJbyjh=af7R8+rj4K-fs-FO_UnkZKx=LPNTk2DLz3vB7gGg@mail.gmail.com
Whole thread Raw
In response to How to maintain the csv log files in pg_log directory only for past30 days  (Raghavendra Rao J S V <raghavendrajsv@gmail.com>)
List pgsql-general
On Fri, Sep 28, 2018 at 7:03 AM, Raghavendra Rao J S V
<raghavendrajsv@gmail.com> wrote:
> Log file will be generated in csv format at pg_log directory in our
> PostgreSQL. Every day we are getting one log file. We would like to maintain
> only max 30 days. Which setting need to modify by us in “postgresql.conf” in
> order to recycle the log files after 30 days.

I have similar problems in a lot of things and normally use "find
<directory> -name <whatever> -mtime +<age> -delete" in the daemons
cron ( gnu find, on linux, I assume other os have a similar command ).

For postgres-only solutions you've been given some advice previously,
and like those I only know ways to do it daily/weekly/monthly/yearly.

Francisco Olarte.


pgsql-general by date:

Previous
From: Arup Rakshit
Date:
Subject: Re: Why my query not using index to sort?
Next
From: Adrian Klaver
Date:
Subject: Re: Why my query not using index to sort?