Re: [RFC] Incremental backup v2: add backup profile to base backup - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: [RFC] Incremental backup v2: add backup profile to base backup
Date
Msg-id 5432C0A1.3090203@vmware.com
Whole thread Raw
In response to Re: [RFC] Incremental backup v2: add backup profile to base backup  (Marco Nenciarini <marco.nenciarini@2ndquadrant.it>)
List pgsql-hackers
On 10/06/2014 07:06 PM, Marco Nenciarini wrote:
> Il 06/10/14 17:55, Robert Haas ha scritto:
>> On Mon, Oct 6, 2014 at 11:51 AM, Marco Nenciarini
>> <marco.nenciarini@2ndquadrant.it> wrote:
>>> I agree that a full backup does not need to include a profile.
>>>
>>> I've added the option to require the profile even for a full backup, as
>>> it can be useful for backup softwares. We could remove the option and
>>> build the profile only during incremental backups, if required. However,
>>> I would avoid the needing to scan the whole backup to know the size of
>>> the recovered data directory, hence the backup profile.
>>
>> That doesn't seem to be buying you much.  Calling stat() on every file
>> in a directory tree is a pretty cheap operation.
>>
>
> In case of incremental backup it is not true. You have to read the delta
> file to know the final size. You can optimize it putting this
> information in the first few bytes, but in case of compressed tar format
> you will need to scan the whole archive.

I think you're pretty much screwed with the compressed tar format 
anyway. The files in the .tar can be in different order in the 'diff' 
and the base backup, so you need to do random access anyway when you try 
apply the diff. And random access isn't very easy with uncompressed tar 
format either. I think it would be acceptable to only support 
incremental backups with the directory format.

In hindsight, our compressed tar format was not a very good choice, 
because it makes random access impossible.

- Heikki




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [RFC] Incremental backup v2: add backup profile to base backup
Next
From: Marco Nenciarini
Date:
Subject: Re: [RFC] Incremental backup v2: add backup profile to base backup