Re: log files - Mailing list pgsql-novice

From Kevin Grittner
Subject Re: log files
Date
Msg-id 1368649680.63528.YahooMailNeo@web162905.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: log files  (jjurban <jjurban@attglobal.net>)
Responses Re: log files  (jjurban <jjurban@attglobal.net>)
List pgsql-novice
jjurban <jjurban@attglobal.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


pgsql-novice by date:

Previous
From: Gavin Flower
Date:
Subject: Re: log files
Next
From: Jay Riddle
Date:
Subject: Lightning Talk Presentation