From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Include WAL in base backup |
Date: | 2011-01-15 21:07:56 |
Message-ID: | AANLkTikgmZRkBuQ+_hcwPBv7Cd7xW48Ev=UBHA-k4v0W@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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/
Attachment | Content-Type | Size |
---|---|---|
basebackup_wal.patch | text/x-patch | 10.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2011-01-15 21:14:19 | Re: pg_basebackup for streaming base backups |
Previous Message | Simon Riggs | 2011-01-15 20:53:18 | Re: Spread checkpoint sync |