Skip site navigation (1) Skip section navigation (2)

Re: Allowing multiple concurrent base backups

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allowing multiple concurrent base backups
Date: 2011-01-27 13:15:44
Message-ID: AANLkTinUxOuO3heH_HnyRCZzfs2MOcJ3eKZ1XiRccFJp@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, Jan 25, 2011 at 1:02 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Tue, Jan 25, 2011 at 6:02 AM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>> Hmm, perhaps the code would be more readable if instead of the
>> forcePageWrites counter that counts exclusive and non-exclusive backups, and
>> an exclusiveBackup boolean indicating if one of the in-progress backups is
>> an exclusive one, we had a counter that only counts non-exclusive backups,
>> plus a boolean indicating if an exclusive backup is in progress in addition
>> to them.
>>
>> Attached is a patch for that (against master branch, including only xlog.c).
>
> I read this patch and previous-posted one. Those look good.
>
> Comments:
>
> + * do_pg_start_backup is the workhorse of the user-visible pg_stop_backup()
> + * function.
>
> Typo: s/do_pg_start_backup/do_pg_stop_backup
>
> It's helpful to explain about this behavior in pg_basebackup.sgml or elsewhere.

When I read the patch, I found that pg_stop_backup removes the backup history
file as soon as it creates the file, if archive_mode is not enabled.
This looks like
oversight. We should prevent pg_stop_backup from removing the fresh history
file? Or we should prevent pg_stop_backup from creating the history
file from the
beginning since it's not used at all if archiving is disabled?
(If archiving is enabled, the history file can be used to clean the
archived files up).

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-01-27 13:26:48
Subject: Re: sepgsql contrib module
Previous:From: Hiroshi InoueDate: 2011-01-27 13:03:13
Subject: setlocale and gettext in Postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group