Re: URGENT issue: pg-xlog growing on master!
От | Niels Kristian Schjødt |
---|---|
Тема | Re: URGENT issue: pg-xlog growing on master! |
Дата | |
Msg-id | 4BA47952-3CFC-4B02-9B70-8D3FFD84DA61@autouncle.com обсуждение исходный текст |
Ответ на | Re: URGENT issue: pg-xlog growing on master! (Jeff Janes <jeff.janes@gmail.com>) |
Список | pgsql-performance |
Solved it - thanks!
Den 10/06/2013 kl. 20.24 skrev Jeff Janes <jeff.janes@gmail.com>:
On Mon, Jun 10, 2013 at 11:02 AM, Niels Kristian Schjødt <nielskristian@autouncle.com> wrote:Okay, coolYou mean that I should do the following right?:1. Stop slave serverAt 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 serverYou can simply do a reload rather than a full restart.4. run psql -c "SELECT pg_start_backup('label', true)" on masterNo, 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
В списке pgsql-performance по дате отправления: