I have some doubts about how the workflow proccess in PostgreSQL replication using archiving logs.
If I have this configuration in Master postgresql.conf:
archive_command = 'test ! -f /path/to/archive/%f && cp %p /path/to/archive/%f'
After the %p and %f parameters have been replaced, the actual command executed might look like this:
test ! -f /path/to/archive/00000001000000A900000065 && cp pg_xlog/00000001000000A900000065 /path/to/archive/00000001000000A900000065
Ok, if the file isn't into archive, then it will be copied.
If I have this configuration in Slave recovery.conf:
restore_command = 'cp /path/to/archive/%f %p'
Then if I don't configure anything like this :
scp /master/path/to/archive/* /slave/path/to/archive/
How is possible that the xlogs files in /path/to/archive/ travels from Master to Slave, and then the Slave copy them to its pg_xlog/ directory?