From: | Niels Kristian Schjødt <nielskristian(at)autouncle(dot)com> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | "pgsql-performance(at)postgresql(dot)org list" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: URGENT issue: pg-xlog growing on master! |
Date: | 2013-06-10 19:12:25 |
Message-ID: | 4BA47952-3CFC-4B02-9B70-8D3FFD84DA61@autouncle.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Solved it - thanks!
Den 10/06/2013 kl. 20.24 skrev Jeff Janes <jeff(dot)janes(at)gmail(dot)com>:
> On Mon, Jun 10, 2013 at 11:02 AM, Niels Kristian Schjødt <nielskristian(at)autouncle(dot)com> wrote:
> Okay, cool
>
> You 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 server
> 3. 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(at)192(dot)168(dot)0(dot)2:/var/lib/postgresql/9.2/main/" on master server
> 6. run psql -c "SELECT pg_stop_backup();" on master server
> 7. change archive_command back on master
> 8. restart master
> 9. start slave
>
> Just to confirm the approach :-)
>
>
> Cheers,
>
> Jeff
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Rafael Domiciano | 2013-06-11 12:48:45 | 9.2.2 - semop hanging |
Previous Message | Niels Kristian Schjødt | 2013-06-10 18:31:18 | Re: URGENT issue: pg-xlog growing on master! |