I have a streaming replication running between two servers.

I just upgraded to postgresql 9.3 from 9.2. Earlier on in my 9.2 setup, I have tried that my slave server went offline due to a network outage. This resulted in unshipped wal-log files building up and taking up space VERY fast on my master server.

Can I prevent this in an easy way in 9.3?

I have seen the new wal_sender_timeout config, but I am unsure what exactly it does?

What's the best way of preventing wal-files from building up on sender if receiver goes offline in 9.3?

  • What's your archive_command doing? Commented Feb 26, 2014 at 11:22

1 Answer 1


Set wal_keep_segments to a low enough value that WAL will be discarded before pg_xlog fills up.

If you're also using WAL archiving with an archive_command, Pg will keep on trying until it successfully sends the WAL or runs out of space. Don't have your master copy the WAL directly to the replica; instead put it on some reliable high availability storage that the replica also has access to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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