pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Claudio Freire <klaussfreire@gmail.com>
Cc: Karl Denninger <karl@denninger.net>
Cc: delongboy <sdelong@saucontech.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to upgrade from 9.1 to 9.2 with replication?
Date: Wed, 7 Nov 2012 13:36:33 -0500
Message-ID: <20121107183633.GA19163@momjian.us> (raw)
In-Reply-To: <CAGTBQpa_ZFEyzFGE_8+diVjUOiYMFARkUrPs2reBq71GaJ-tvg@mail.gmail.com>
References: <1350598882643-5728941.post@n5.nabble.com>
	<50816749.6010804@denninger.net>
	<CAGTBQpa_ZFEyzFGE_8+diVjUOiYMFARkUrPs2reBq71GaJ-tvg@mail.gmail.com>

On Fri, Oct 19, 2012 at 12:02:49PM -0300, Claudio Freire wrote:
> > This unfortunately does require a new data copy to be pulled across to the
> > slave.  For the local copies this isn't so bad as wire speed is fast enough
> > to make it reasonable; for the actual backup units at a remove it takes a
> > while as the copy has to go across a WAN link.  I cheat on that by using a
> > SSH tunnel with compression turned on (which, incidentally, it would be
> > really nice if Postgres supported internally, and it could quite easily --
> > I've considered working up a patch set for this and submitting it.)
> >
> > For really BIG databases (as opposed to moderately-big) this could be a
> > much-more material problem than it is for me.
> 
> Did you try?
> 
> Bring both down.
> pg_upgrade master
> Bring master up
> pg_upgrade slave

Is there any reason to upgrade the slave when you are going to do rsync
anyway?  Of course you need to install the new binaries and libs, but it
seems running pg_upgrade on the standby is unnecessary.

> rsync master->slave (differential update, much faster than basebackup)
> Bring slave up

Good ideas.  I have applied the attached doc patch to pg_upgrade head
and 9.2 docs to suggest using rsync as part of base backup.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

Attachments:

rsync.diff (text/x-diff, 974B) download diff --git a/doc/src/sgml/pgupgrade.sgml b/doc/src/sgml/pgupgrade.sgml new file mode 100644 index 301222c..998cb2f *** a/doc/src/sgml/pgupgrade.sgml --- b/doc/src/sgml/pgupgrade.sgml *************** psql --username postgres --file script.s *** 529,535 **** <para> A Log-Shipping Standby Server (<xref linkend="warm-standby">) cannot be upgraded because the server must allow writes. The simplest way ! is to upgrade the primary and use rsync to rebuild the standbys. </para> <para> --- 529,538 ---- <para> A Log-Shipping Standby Server (<xref linkend="warm-standby">) cannot be upgraded because the server must allow writes. The simplest way ! is to upgrade the primary and use <command>rsync</> to rebuild the ! standbys. You can run <command>rsync</> while the primary is down, ! or as part of a base backup (<xref linkend="backup-base-backup">) ! which overwrites the old standby cluster. </para> <para>

view thread (21+ messages)  latest in thread

Message-ID: <20121107183633.GA19163@momjian.us>
Permalink:  ../20121107183633.GA19163@momjian.us/
Also on:    postgresql.org/message-id/20121107183633.GA19163@momjian.us

 ·  · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: bruce@momjian.us, klaussfreire@gmail.com, karl@denninger.net, sdelong@saucontech.com
  Subject: Re: How to upgrade from 9.1 to 9.2 with replication?
  In-Reply-To: <20121107183633.GA19163@momjian.us>
  References: <1350598882643-5728941.post@n5.nabble.com> <50816749.6010804@denninger.net> <CAGTBQpa_ZFEyzFGE_8+diVjUOiYMFARkUrPs2reBq71GaJ-tvg@mail.gmail.com> <20121107183633.GA19163@momjian.us>

* 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