Re: Reducing excess files in pg_xlog

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: Reducing excess files in pg_xlog
Дата
Msg-id bddc86151003220937j63a1cbact337a76db86b3408d@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Reducing excess files in pg_xlog  (Greg Smith <greg@2ndquadrant.com>)
Ответы Re: Reducing excess files in pg_xlog  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 22 March 2010 16:06, Greg Smith <greg@2ndquadrant.com> wrote:
Thom Brown wrote:
I noticed there's 66 files in my pg_xlog directory.  I changed my checkpoint_segments from 32 to 3 as I noticed it was too high, restarted PosgreSQL, but there are still 66 files in that directory and they're taking up about 1.1G.
How can I get this list of files down?

A checkpoint after there's been some write activity in the database should reduce this down to a reasonable number.  If the system has been idle since the last checkpoint, it doesn't do anything when you ask for another one, which includes skipping this cleanup; that may be why you haven't seen it drop yet.

I'm assuming you don't have WAL shipping turned on by setting archive_command.  There can also be an excess of these segments that can't be cleaned up if your archiving scheme fails.


Hi Greg,

You're right, I don't have the archiving enabled.  All options are commented out.

I've just forced a new WAL file by writing lots of stuff to a table, then deleting it.  It appears to be recyling the filenames now.  The latest files end in DD and DE, and the earliest is DF.  Presumably these will slowly get eaten up until it's just down to the 3 files I've configured it for?

Thom

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: strange
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Reducing excess files in pg_xlog