Re: log files

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: jjurban <jjurban(at)attglobal(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: log files
Date: 2013-05-15 01:20:40
Message-ID: CA+HiwqE3tRcxVwiTzVdsJTt69cj9K9wxy2bt0X2aFE21BVMvYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

  • log files at 2013-05-14 20:06:34 from jjurban

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message jjurban 2013-05-15 19:01:31 Re: log files
Previous Message Amit Langote 2013-05-15 01:01:39 Re: log files