Re: Streaming a base backup from master
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Greg Stark <gsstark@mit.edu>
Cc: Martijn van Oosterhout <kleptog@svana.org>, Stephen Frost <sfrost@snowman.net>, Dave Page <dpage@pgadmin.org>, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Magnus Hagander <magnus@hagander.net>
Date: 2010-09-05T02:58:25Z
Lists: pgsql-hackers
On Sat, Sep 4, 2010 at 9:42 AM, Greg Stark <gsstark@mit.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