[Pgcluster-general] Cybercluster-1.0.0 recovery bug

Rick Vernam rickv at hobi.com
Wed Jan 16 16:24:37 UTC 2008


I suppose it makes sense to do check for clear_bkup_dir() & bkup_dir() in a 
similar fashion.

On Wednesday 16 January 2008 02:01:05 am At.Mitani wrote:
> Hi Rick,
>
> Thank you for create patch.
> If you can agree with , I'd like to recomend check it in the
> "restore_dir()" as following patch.
>
> --- recovery.c.old      2008-01-16 16:53:43.000000000 +0900
> +++ recovery.c  2008-01-16 16:52:03.000000000 +0900
> @@ -682,6 +682,10 @@
>         char bkp_dir[256];
>         pid_t pid = getpid();
>
> +       if (PGR_Recovery_Mode == PGR_WITHOUT_BACKUP)
> +       {
> +               return STATUS_OK;
> +       }
>         sprintf(org_dir,"%s",dir_name);
>         sprintf(bkp_dir,"%s_%d",dir_name,pid);
>         status = rename(bkp_dir,org_dir);
>
>
> Regards,
> ----------------
> At.Mitani
>
>
> On Wed, 16 Jan 2008 00:00:12 -0600
>
> Rick Vernam <rickv at hobi.com> wrote:
> > I wrote a patch for pgcluster (which cybercluster is based on) that were
> > not applied correctly to cybercluster.
> >
> > in src/backend/libpq/recovery.c
> > all occurrences of restore_dir(...) should be conditional upon
> > if (PGR_Recovery_Mode != PGR_WITHOUT_BACKUP)
> >
> > so, instead of
> > restore_dir(...)
> >
> > it should be
> > if (PGR_Recovery_Mode != PGR_WITHOUT_BACKUP)
> > 	restore_dir(...)
> >
> > This is a serious bug that occurs when a node starts recovery with -u
> > (rsync recovery without backup), and results in a lost base directory.
> >
> > see attached patch for fix.
> >
> > -Rick


-------------- next part --------------
A non-text attachment was scrubbed...
Name: cybercluster-1.0.0-PGR_WITHOUT_BACKUP.patch
Type: text/x-diff
Size: 2427 bytes
Desc: not available
Url : http://pgfoundry.org/pipermail/pgcluster-general/attachments/20080116/aaf243e1/attachment.bin 


More information about the Pgcluster-general mailing list