Re: pg_xlog is getting bigger

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pg_xlog is getting bigger
Дата
Msg-id 20131125185929.GE6597@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: pg_xlog is getting bigger  (Pankaj Mishra <pankaj.mimit@gmail.com>)
Список 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@ymail.com> wrote:
>
> > Pankaj <pankaj.mimit@gmail.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


В списке pgsql-general по дате отправления:

Предыдущее
От: Tree
Дата:
Сообщение: Streaming replication and WAL archives
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: pg_xlog is getting bigger