Re: pg_xlog is getting bigger

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Pankaj Mishra <pankaj(dot)mimit(at)gmail(dot)com>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_xlog is getting bigger
Date: 2013-11-25 18:59:29
Message-ID: 20131125185929.GE6597@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pankaj Mishra escribió:
> Dera Kevin,
>
> If you run checkpoint in database then you can delete the pg_xlog other
> then current timestamp. We do this to our customer on regular basis when
> pg_xlog exceed more then 15 gb

That is "somewhat" correct (meaning you are less likely to see data
corruption in that case), but it is still misleading advice. The system
is prepared to delete the files it no longer needs automatically. If
you have WAL files piling up for no apparent reason, the most likely
explanation is that the server is misconfigured, for example due to a
failing archive_command, or to a high "keep" setting for WAL files
(which is used in some replication scenarios). In those cases, the real
solution is to fix that problem, not delete files yourself.

> On Sat, Nov 23, 2013 at 1:48 AM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
>
> > Pankaj <pankaj(dot)mimit(at)gmail(dot)com> wrote:
> >
> > > now go to pg_xlog folder you can can see a pattern in file names of logs.
> > > Just remove the file other then current time stamp. Or for safety remove
> > > logs other then current date.
> >
> > No!!! NEVER remove ANY files from the pg_xlog sub-directory! That
> > will corrupt your database.
> >
> > --
> > Kevin Grittner
> > EDB: http://www.enterprisedb.com
> > The Enterprise PostgreSQL Company
> >

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2013-11-25 19:20:39 Re: pg_xlog is getting bigger
Previous Message Tree 2013-11-25 18:58:00 Streaming replication and WAL archives