How to perform recovery using archived WAL logs in postgresql?
I have enabled streaming replication between two server say master and slave. Now after this I enabled archiving changing following parameters-
On the master node, configure "postgresql.conf"
archive_mode = on
archive_command = 'cp %p /u01/arch/%f'
archive_timeout = 120
max_wal_senders = 5
wal_keep_segments = 10
After this I edited the recovery.conf file on the slave server-
modify "recovery.conf" on the standby node
trigger_file = '/tmp/pg_
restore_command = 'cp /u01/arch/%f %p'
Now due to server load the slave WAL receiver lags behind and the WAL needed by slave has been archived and removed from the pg_xlog.
Issue is that the following error is generated on slave-
cp: cannot stat `/u01/arch/
2013-09-18 16:02:38 IST LOG: streaming replication successfully connected to primary
2013-09-18 16:02:38 IST FATAL: could not receive data from WAL stream: FATAL: requested WAL segment 000000010000000
Please help me to resolve this.
Thanks in advance.
Lakhan
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Lakhan Agarwal for more information if necessary.