pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Niels Kristian Schjødt <nielskristian@autouncle.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-performance@postgresql.org list <pgsql-performance@postgresql.org>
Subject: Re: URGENT issue: pg-xlog growing on master!
Date: Mon, 10 Jun 2013 21:12:25 +0200
Message-ID: <4BA47952-3CFC-4B02-9B70-8D3FFD84DA61@autouncle.com> (raw)
In-Reply-To: <CAMkU=1yrOnRWA+ETgyo3hv7wHW=JDrvrZq++pktrytcgt=-ScA@mail.gmail.com>
References: <BCE969C3-612D-4622-8E7D-B3241D23EEA4@autouncle.com>
	<CAGrpgQ9mc+jwqj_ZK4MCFmx7RaSifdPDsCRaw0qT=bG0RTLMVg@mail.gmail.com>
	<4DB42015-B9C6-4019-9A4D-68E356C8C947@autouncle.com>
	<CAMkU=1zf9jbmY7D_oof59qbecx=DJr_gGg2MOW_9QQQ7GvQO2g@mail.gmail.com>
	<44F3F6DC-A0BB-407A-AA4D-3879AE5DE221@autouncle.com>
	<CAMkU=1yrOnRWA+ETgyo3hv7wHW=JDrvrZq++pktrytcgt=-ScA@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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, 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@192.168.0.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
> 
> 

view thread (13+ messages)

Message-ID: <4BA47952-3CFC-4B02-9B70-8D3FFD84DA61@autouncle.com>
Permalink:  ../4BA47952-3CFC-4B02-9B70-8D3FFD84DA61@autouncle.com/
Also on:    postgresql.org/message-id/4BA47952-3CFC-4B02-9B70-8D3FFD84DA61@autouncle.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: nielskristian@autouncle.com, jeff.janes@gmail.com
  Subject: Re: URGENT issue: pg-xlog growing on master!
  In-Reply-To: <4BA47952-3CFC-4B02-9B70-8D3FFD84DA61@autouncle.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox