Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is there any way how I can clean up postgres WAL files ON MASTER SERVER - SLAVE is OK, but master has wal keep segment set to 2000 and this is causing disk space usage to grow. I'm looking for a way how to clean up that disk space on MASTER without breaking anything. I know that setting keep segments to 2000 is madness but that was not set by me.

share|improve this question

1 Answer 1

Address the underlying cause and the problem will go away (your underlying problem being someone who didn't know what they were doing and didn't read the Postgres manual set wal_keep_segments to an insane value):

  1. Reduce wal_keep_segments to a sane value.
    (10 is usually sane. 100 is not unreasonable).
  2. Restart the Postgres server.
share|improve this answer

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.