Re: log files

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: log files
Дата
Msg-id CA+HiwqE3tRcxVwiTzVdsJTt69cj9K9wxy2bt0X2aFE21BVMvYg@mail.gmail.com
обсуждение исходный текст
Ответ на log files  (jjurban <jjurban@attglobal.net>)
Ответы Re: log files  (jjurban <jjurban@attglobal.net>)
Список pgsql-novice
Hello John,

Those are Write Ahead Log (WAL) file segments (16MB each) and are part
of PostgreSQL's REDO mechanism.
PostgreSQL official documentation on WAL:

http://www.postgresql.org/docs/9.2/static/wal.html

>1. Can I delete them and still continue to run?

You would not be able to recover if you deleted the segments that
PostgreSQL would require for recovery. That is, if you delete WAL
segments after the last checkpoint, you would not be able to recover
consistently. Note that a checkpoint is a point in database operation,
all the data changes before which, are guaranteed to be written out to
data files (hence consistent). So, all the WAL data after the last
checkpoint is essential for consistent should the database crash,
since the data changes (that this WAL data represents) have not made
to the data files yet. Though, you wouldn't require any of WAL data
before a checkpoint (though, you may still keep old WAL files in an
archive directory different than pg_xlog to later perform a
Point-in-Time-Recovery).

>2. How do I turn off the generation of these files?

You can not turn off generation of these files. They are an integral
part of consistent database operation that ensure integrity and crash
safety. Though, you may control the number of such segments under
pg_xlog. I would recommend you read PostgreSQL documentation about
ways to do this.


--
Amit Langote


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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: log files
Следующее
От: jjurban
Дата:
Сообщение: Re: log files