heroku/WAL-E — pull request #41 by mikeyk (2012-07-24 01:38:15+00:00)
Title: Support for backing up non-running PG cluster

With our Postgres instances, we have a master->slave setup where the slave is currently responsible for taking backups (using EC2 snapshots). We wanted to move them forever to taking WAL-E-compatible backups, but the backup-push function requires a running psql to query it for a valid WAL file range using pg_start/stop_backup(). This patch adds a flag to backup-push, "--pg-is-stopped-replica", which uses pg_controldata to determine the current restartpoint's WAL location and is otherwise identical to backup-push. We've been using it for the last week to bootstrap new nodes.