Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Our production server is running PostgreSQL v8.2.3 on CentOS release 5.2 (Final).

We've setup PITR in our production server. For some reasons, after setting up PITR, we're not able to manage and maintain it. Eventually, our WAL archive drive (secondary drive) has become full (100% use) and additional WAL archive segments that are to be archived got accumulated in pg_xlog/ directory itself (which is available in primary drive)


There are 2 drives:

  1. Primary drive (pgsql/data/ directory resides) is 400 GB.
  2. Secondary drive (WAL archives) is 300 GB. All WAL archives are written to this secondary drive.

Now, we've decided to stop/disable PITR.

My question is, in this situation, how do I stop/disable PITR and safely clean up all WAL segments from both the drives?

What are the recommended/suggested ways? Experts advice/idea/suggestion on this are highly appreciated.

share|improve this question

To stop the archiving in 8.2, you set archive_command to empty ('') and restart the server. The data directory should clean itself up. The archives on your secondary drive you can just throw away.

share|improve this answer
I understand that setting archive_command to empty ('') will stop/disable archiving. But will this also automatically remove/delete all accumulated old WAL files from pg_xlog/ directory? – Gnanam Jan 18 '11 at 5:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.