I am a newbie tasked with setting up a warm standby server using log shipping and I am close. The logs are copied from the production server and placed in /opt/novell/idm/Postgres/data/archives
I have over 90 logs there.
Here is my recovery.conf file:
restore_command = 'pg_standby -d /opt/novell/idm/Postgres/data/archives %f %p %r 2>>standby.log'
Here is the content of standby.log
Trigger file : <not set>
Waiting for WAL file : 000000020000000000000002
WAL file path : /opt/novell/idm/Postgres/data/archives/000000020000000000000002
Restoring to : pg_xlog/RECOVERYXLOG
Sleep interval : 5 seconds
Max wait interval : 0 forever
Command for restore : cp "/opt/novell/idm/Postgres/data/archives/000000020000000000000002" "pg_xlog/RECOVERYXLOG"
Keep archive history : 000000000000000000000000 and later
WAL file not present yet.
Here are the problems that I see:
Waiting for WAL file : 000000020000000000000002
That WAL file name belongs to the standby server. The WAL files in the archives directory, which holds the logs from the production server, begin with 00000001000000000000001A and go up from there but have not reached 0000000020000000000000002. As I understand it, the standby server should be consuming the log files from the production server, not its own.
Is there a configuration option to change the WAL file returned by %f?
Is this the right approach?