Re: log files

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: jjurban <jjurban(at)attglobal(dot)net>, Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: log files
Date: 2013-05-15 20:28:00
Message-ID: 1368649680.63528.YahooMailNeo@web162905.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

jjurban <jjurban(at)attglobal(dot)net> wrote:
> Amit Langote wrote:

> There are over 5.7 Gigabytes of these files.  This cannot be
> correct.

That depends entirely on your configuration.  In some environments
that would be excessive; in others it might be just right.

> Which of these can I remove?

It is a bad idea to remove any of them yourself.  If you configure
PostgreSQL to keep fewer of them, the unneeded ones according to
your new configuration should get cleaned up fairly quickly.

>> 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

> What can I do to avoid generating these monstrous files?

Read the referenced documentation.  Primarily you will be
interested in checkpoint_segments, wal_keep_segments, and settings
related to archiving -- since if archiving is turned on these files
must be kept in the pg_xlog directory until successfully archived.

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jay Riddle 2013-05-16 04:25:58 Lightning Talk Presentation
Previous Message Gavin Flower 2013-05-15 19:51:58 Re: log files