Slave will return errors:
- 2011-04-15 15:22:49 UTC FATAL: could not receive data from WAL stream: FATAL: requested WAL segment 0000000100000002000000C5 has already been removed
This is due to the fact that the master file is already fully recorded 0000000100000002000000C5 and moved it from the folder / var/lib/postgresql/9.0/main/pg_xlog in folder / var/lib/postgresql/9.0/main/archive.
Required Actions:
master
- sudo-u postgres psql-c "SELECT pg_start_backup ('label', true)"
- cd / var/lib/postgresql/9.0/main
- tar cvzf ~ / archive.tgz archive
- sudo-u postgres psql-c "SELECT pg_stop_backup ()"
- scp-P 1022-r ~ / archive.tgz * @ *
- sudo-u postgres psql-c "SELECT pg_current_xlog_location ()"
slave
- / Etc / init.d / postgresql stop
- tar xvzf ~ / archive.tgz-C / var/lib/postgresql/9.0/main
- chown-R postgres: postgres / var/lib/postgresql/9.0/main/archive
- / Etc / init.d / postgresql start
- sudo-u postgres psql-c "SELECT pg_last_xlog_replay_location ()"
No comments:
Post a Comment