Re: How to upgrade from 9.1 to 9.2 with replication?

Поиск
Список
Период
Сортировка
От Claudio Freire
Тема Re: How to upgrade from 9.1 to 9.2 with replication?
Дата
Msg-id CAGTBQpYcbPnT2UYj3i_o6nMYuGNN-xY1fJeQ3AXEetCDt1cfQA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to upgrade from 9.1 to 9.2 with replication?  (Shaun Thomas <sthomas@optionshouse.com>)
Список 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 по дате отправления:

Предыдущее
От: Shaun Thomas
Дата:
Сообщение: Re: How to upgrade from 9.1 to 9.2 with replication?
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: Query-Planer from 6seconds TO DAYS