Re: Streaming a base backup from master

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>, Dave Page <dpage(at)pgadmin(dot)org>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: Streaming a base backup from master
Date: 2010-09-05 02:58:25
Message-ID: AANLkTikHBf5vPs1Vt4QznRS-CZ6RB2NHh80+NNG3L68H@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Sep 4, 2010 at 9:42 AM, Greg Stark <gsstark(at)mit(dot)edu> wrote:
> *However* I tihnk you're all headed in the wrong direction here. I
> don't think rsync is what anyone should be doing with their backups at
> all. It still requires scanning through *all* your data even if you've
> only changed a small percentage (which it seems is the use case you're
> concerned about) and it results in corrupting your backup while the
> rsync is in progress and having a window with no usable backup. You
> could address that with rsync --compare-dest but then you're back to
> needing space and i/o for whole backups every time even if you're only
> changing small parts of the database.

It depends. If the use case is "I accidentally (or purposefully but
temporarily) started up my slave as a master, and now I want it to go
back to having it be the master" or "I lost the WAL files I need to
roll this base backup forward (perhaps because wal_keep_segments
wasn't set high enough)", rsync is what you need.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-09-05 05:05:32 Re: lexing small ints as int2
Previous Message Robert Haas 2010-09-05 02:55:57 Re: git: uh-oh