pg_basebackup and snapshots

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Ian Barwick <ian(dot)barwick(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: pg_basebackup and snapshots
Date: 2020-02-07 19:56:47
Message-ID: 20200207195647.GM3195@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Greetings,

(Moving to -hackers, changing thread title)

* Andres Freund (andres(at)anarazel(dot)de) wrote:
> Maybe that's looking too far into the future, but I'd like to see
> improvements to pg_basebackup that make it integrate with root requiring
> tooling, to do more efficient base backups. E.g. having pg_basebackup
> handle start/stop backup and WAL handling, but do the actual backup of
> the data via a snapshot mechanism (yes, one needs start/stop backup in
> the general case, for multiple FSs), would be nice.

The challenge with this approach is that you need to drop the 'backup
label' file into place as part of this operation, either by putting it
into the snapshot after it's been taken, or by putting it into the data
directory at restore time. Of course, you have to keep track of WAL
anyway from the time the snapshots are taken until the restore is done,
so it's certainly possible, as with all of this, it's just somewhat
complicated.

Certainly open to ideas on how to improve this.

Thanks,

Stephen

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2020-02-07 20:21:56 Re: pg_basebackup and snapshots
Previous Message Tom Lane 2020-02-07 19:25:27 Re: pgsql: Fix bug in Tid scan.

Browse pgsql-hackers by date

  From Date Subject
Next Message Chapman Flack 2020-02-07 20:05:42 Re: Does recovery write to backup_label ?
Previous Message Andres Freund 2020-02-07 19:55:46 Re: Does recovery write to backup_label ?