Re: Logfile purge

From: Harshad Adalkonda <adalkondaharshad(at)gmail(dot)com>
To: shyamkant(dot)dhamke(at)wipro(dot)com
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Logfile purge
Date: 2014-12-18 13:04:45
Message-ID: CANnQH_i-ozUiw08UM__79hUmfcO-SAiHcfbhNBAC6rE5AkjcSQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Dec 18, 2014 at 10:39 AM, <shyamkant(dot)dhamke(at)wipro(dot)com> wrote:

> Hi,
>
>
>
> I need help on PostGres 9.2 version. How to purge the logfile generated by
> the postgres server? How I can restrict the size of this file?
>
>
>
>
>
> Regards
>
> Shyamkant
>

Hi Shyamkant,

If you want purge the log file you set *log_truncate_on_rotation=on in *
postgresql.conf
but this *log_truncate_on_rotation* works on time-drivan basic not on size,
so you need to also specify *log_rotation_age=1d *.

You can restrict the size with *log_rotation_size=10MB *, but after 10MB it
will create new file of 10MB again.

You can't use both the *log_truncate_on_rotation & **log_rotation_size at
same time.*

*Thanks & Regards,*

Harshad Adalkonda
Database Administrator
harshad(dot)adalkonda(at)shreeyansh(dot)com

http://www.shreeyansh.com

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Guillaume Lelarge 2014-12-21 22:14:21 Re: Does "pg_ctl stop" wait for archiving to complete?
Previous Message Harshad Adalkonda 2014-12-18 07:25:37 Re: Command to take only schema backup