use of archive_command in PostgreSQL streaming replication

Viewed 3168

When using streaming replication can someone please explain the purpose of archive_command and restore_command in PostgreSQL?

As i studied in streaming replication secondary server read and apply the partially filled WAL files.suppose i have my wal segment location in pg_xlog and using archive_command i am copying this to my local archive directory say /arclogs.

So if secondary server is going to read the partially filled archive logs from pg_xlog over the network then what's the use of files kept in /arclogs. and also the files will be sent to /arclogs only when they will be 16 mb?

I'm new to PostgreSQL & your help will be appericated.

1 Answers
Related