Re: How to upgrade from 9.1 to 9.2 with replication? - Mailing list pgsql-performance

From Claudio Freire
Subject Re: How to upgrade from 9.1 to 9.2 with replication?
Date
Msg-id CAGTBQpYcbPnT2UYj3i_o6nMYuGNN-xY1fJeQ3AXEetCDt1cfQA@mail.gmail.com
Whole thread Raw
In response to Re: How to upgrade from 9.1 to 9.2 with replication?  (Shaun Thomas <sthomas@optionshouse.com>)
List pgsql-performance
On Thu, Oct 25, 2012 at 9:47 AM, Shaun Thomas <sthomas@optionshouse.com> wrote:
>> ... as long as the rsync was bracketed by calls to pg_start_backup()
>> and pg_stop_backup().
>
>
> Or they took it during a filesystem snapshot, or shut the database down.
>
> I thought that the only thing start/stop backup did was mark the beginning
> and end transaction logs for the duration of the backup so they could be
> backed up separately for a minimal replay.
>
> An rsync doesn't need that, because it's binary compatible. You get two
> exact copies of the database, provided data wasn't changing. That's easy
> enough to accomplish, really.
    ... as long as the rsync was bracketed by calls to pg_start_backup()
    and pg_stop_backup().


Or they took it during a filesystem snapshot, or shut the database down.

I thought that the only thing start/stop backup did was mark the
beginning and end transaction logs for the duration of the backup so
they could be backed up separately for a minimal replay.

An rsync doesn't need that, because it's binary compatible. You get
two exact copies of the database, provided data wasn't changing.
That's easy enough to accomplish, really.
Well, that's the thing. Without pg_start_backup, the database is
changing and rsync will not make a perfect copy. With pg_start_backup,
the replica will replay the WAL from the start_backup point, and any
difference rsync left will be ironed out.

That's why I say:

rsync - the first one takes a long time
start backup
rsync - this one will take a lot less
stop backup


pgsql-performance by date:

Previous
From: Shaun Thomas
Date:
Subject: Re: How to upgrade from 9.1 to 9.2 with replication?
Next
From: Jeff Janes
Date:
Subject: Re: Query-Planer from 6seconds TO DAYS