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

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Raghavendra Rao J S V <raghavendrajsv(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: 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-29 14:12:32
Message-ID: 568940a5-9a25-d119-b69a-3905cdd61b0b@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/28/18 7:05 PM, Raghavendra Rao J S V wrote:
> Hi All,
>
> 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]

Not sure if that matters or not.

>
> log_filename = 'postgresql-%d.log'
> log_truncate_on_rotation = 'on',
>
> Regards,
> Raghavendra Rao
>
> On Sat, 29 Sep 2018 at 04:24, Michael Paquier <michael(at)paquier(dot)xyz
> <mailto:michael(at)paquier(dot)xyz>> wrote:
>
> On Fri, Sep 28, 2018 at 06:19:16AM -0700, Adrian Klaver wrote:
> > If log_truncate_on_rotation = 'on', correct?
>
> Yup, thanks for precising.
> --
> Michael
>
>
>
> --
> Regards,
> Raghavendra Rao J S V
> Mobile- 8861161425

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arup Rakshit 2018-09-29 16:10:09 Re: Why my query not using index to sort?
Previous Message marcelo 2018-09-29 13:47:34 Re: ORM