Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file
Date: 2015-06-15 18:52:54
Message-ID: CAA4eK1Lf7qBgKmRYbs1hje9i8RBYe5-nO_a1TT+TY_Aj-6O1Mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Jun 11, 2015 at 9:55 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
wrote:
>
> On Wed, Jun 10, 2015 at 12:09 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
wrote:
> >
> > On Tue, Jun 9, 2015 at 3:29 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
wrote:
> > > On Tue, Jun 9, 2015 at 10:56 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
wrote:
> > >> Or what about removing tablespace_map file at the beginning of
recovery
> > >> whenever backup_label doesn't exist?
> > >
> > > Yes, thats another way, but is it safe to assume that user won't need
> > > that file,
> >
> > Is there really case where tablespace_map is necessary even though
backup_label
> > doesn't exist? If not, it seems safe to get rid of the file when
backup_label
> > is not present.
> >
> > > I mean in the valid scenario (where both backup_label and
> > > tablespace_map are present and usable) also, we rename them to
> > > *.old rather than deleting it.
> >
> > Yep, I'm OK to make the recovery rename the file to *.old rather than
delete it.
> >
>
> This sounds safe to me, unless anybody else has different opinion
> I will write a patch to fix this way.
>

Attached patch provides a fix as per above discussion.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
rename_mapfile_if_backupfile_not_present_v1.patch application/octet-stream 1.5 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2015-06-16 03:25:07 pgsql: Fix comment in fmgr.h to refer to actual function used.
Previous Message Michael Meskes 2015-06-15 12:33:29 pgsql: Fix memory leak in ecpglib's connect function.

Browse pgsql-hackers by date

  From Date Subject
Next Message John Lumby 2015-06-15 18:58:51 RegisterBackgroundWorker does not actually start a bg worker process in 9.4.4
Previous Message Tomas Vondra 2015-06-15 18:52:49 Re: FIX : teach expression walker about RestrictInfo