Re: How to maintain the csv log files in pg_log directory only for past 30 days

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: Raghavendra Rao J S V <raghavendrajsv(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <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-28 13:28:23
Message-ID: CA+bJJbyjh=af7R8+rj4K-fs-FO_UnkZKx=LPNTk2DLz3vB7gGg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Sep 28, 2018 at 7:03 AM, Raghavendra Rao J S V
<raghavendrajsv(at)gmail(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-09-28 13:29:48 Re: Why my query not using index to sort?
Previous Message Arup Rakshit 2018-09-28 13:19:31 Re: Why my query not using index to sort?