Include WAL in base backup
Magnus Hagander <magnus@hagander.net>
From: Magnus Hagander <magnus@hagander.net>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-01-15T21:07:56Z
Lists: pgsql-hackers
Attachments
- basebackup_wal.patch (text/x-patch) patch
Here's a cutdown version of the idea about including WAL in the base backup. What I initially wanted was to introduce a way to guarantee that the required WAL (with some sort of cutoff of course) would be available for the backup, but I ran out of time for that. We can always add that later. For now, you need to set wal_keep_segments to make it work properly, but if you do the idea is that the tar file/stream generated in the base backup will include all the required WAL files. That means that you can start a postmaster directly against the directory extracted from the tarball, and you no longer need to set up archive logging to get a backup. I've got some refactoring I want to do around the SendBackupDirectory() function after this, but a review of the functionality first would be good. And obviously, documentation is still necessary. The patch to pg_basebackup applies on top of the previously posted version. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/