Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catchup from delta-backup #363

Closed
x4m opened this issue Aug 3, 2019 · 1 comment
Closed

Catchup from delta-backup #363

x4m opened this issue Aug 3, 2019 · 1 comment
Labels
postgres PostgreSQL issue

Comments

@x4m
Copy link
Collaborator

x4m commented Aug 3, 2019

I'll create an issue for this, hope one day we will implement it. Does not seem a big chunk of work and testing. Though I expect only hard-boiled DBA want something like this.

Currently, delta backups are applied on top of other backups. Either base backup or other delta backup.
Delta backup Y from backup X contains all blocks changed since the start of backups X. Also, Y will contain all files WAL-G cannot track blockwise: SLRUs, configs, FSMs, VMs etc.

When a replica is falling behind the primary we can use information from delta-backup to jump through the WAL history: we know blocks numbers that need to be updated.
Here I propose to implement command like wal-g catchup PATH --from-lsn LSN.
PATH should contain PGDATA shut down in recovery somewhere after LSN. WAL-G will look through delta backups and try to restore on most recent point in the history of the backup.

O has somewhat similar functionality in RMAN.

We can read LSN from pg_control, but this seems too intrusive.

@reshke reshke added the postgres PostgreSQL issue label Sep 25, 2019
@g0djan
Copy link
Collaborator

g0djan commented Feb 4, 2020

Commited

@g0djan g0djan closed this as completed Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
postgres PostgreSQL issue
Projects
None yet
Development

No branches or pull requests

3 participants