According to docs
wal_keep_segments (integer) Specifies the minimum number of past log file segments kept in the pg_xlog directory
Meanwhile in my experience - you create a slave and change wal_keep_segments from default to let it be 64, and observe as the number of xlogs starts to grow untill reaches 64 files. Which I assume as maximum, not minimum.
Then if you create a transaction that exceeds 16M*64=1GB slave is broken saying it needs removed WAL file. Because the MAXIMUM number of files is less then it is needed, right?.. So the question: why MINIMUM? Why not MAXIMUM?
Update: AS documentation states in first sentence I'm talking about streaming replication
These settings control the behavior of the built-in streaming replication feature
master, not slave (no cascaded replication)
18.6.1. Sending Server(s)
archive_command
is "do-nothing" cd .
and restore_command
in recovery.conf
is not set up at all
restore_command
configured?64
is too low in your case (without log shipping) as a minimum. OTOH setting a "maximum" number of wal files would achieve nothing. Postgres would respect this maximum by staying below it and the secondary will still miss the missing files when it's too far behind.