On Mon, Jun 10, 2013 at 11:02 AM, Niels Kristian Schjødt <nielskristian@xxxxxxxxxxxxx> wrote:
Okay, coolYou mean that I should do the following right?:1. Stop slave server
At this point, you don't have a slave server. Not a usable one, anyway. If you used to have a hot-standby server, it is now simply a historical reporting server. If you have no need/use for such a reporting server, then yes you should stop it, to avoid confusion.
2. set archive_command = 'true' in postgresql.conf on the master server3. restart master server
You can simply do a reload rather than a full restart.
4. run psql -c "SELECT pg_start_backup('label', true)" on master
No, you shouldn't do that yet without first having correctly functioning archiving back in place. After setting archive_command=true and reloading the server, you have to wait a while for the "bad" WAL files to get pseudo-archived and cleared from the system. Once that has happened, you can then return archive_command to its previous setting, and again reload/restart the server. Only at that point should you begin taking the new backup. In other words, steps 7 and 8 have to be moved up to before step 4.
5. run rsync -av --exclude postmaster.pid --exclude pg_xlog /var/lib/postgresql/9.2/main/ postgres@192.168.0.2:/var/lib/postgresql/9.2/main/" on master server6. run psql -c "SELECT pg_stop_backup();" on master server7. change archive_command back on master8. restart master9. start slaveJust to confirm the approach :-)
Cheers,
Jeff