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

Re: BUG #4162: Hotbackup recovery doesn't work in windows

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: "Javier =?UTF-8?B?UGltw6Fz?=" <elpochodelagente(at)gmail(dot)com>
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4162: Hotbackup recovery doesn't work in windows
Date: 2008-05-13 20:56:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Javier Pimás wrote:
> Hi, I'm making a base backup, and then I try to recover from it. I
> install postgres from msi installer, add some tables and data and
> then follow the steps in "24.3.2. Making a Base Backup". I don't keep
> archiving files forever but archive just the indispensable (basicaly
> the same than pg_hotbackup project but in windows).
> After that I tryied to test the backup by reinstalling postgres and
> following the steps in  "24.3.3. Recovering using a Continuous Archive
> Backup" . It fails in step 8, throwing an error message box. After a
> while I downloaded postgres source files and debug symbols and
> attached visual studio to postgres.exe and debugged it. It always
> failed in the line I told before. It may be possible that any kind of
> recovery be failing, I didn't test.
> I'm not compiling anything, but made a binary patch to the exe (I was
> in a hurry!) that avoids calling close with -1 and recovery process
> started working.

Ok, so the reason we've not seen this before is probably that the
runtime used by a mingw build doesn't crash when given a negative file

I've applied a patch for this and backpatched it all the way to 7.4 to
be consistent (even though that one doesn't build with MSVC, there
could theoretically be other platforms with the same problem - though
we most likely would've seen them by now).

I'll defer to somebody else to try to figure out if something else is
wrong that caused this codepath to be hit, but either way we certainly
shouldn't go around crashing like this...

Thanks for your report and diagnosis!


In response to

pgsql-bugs by date

Next:From: Simon RiggsDate: 2008-05-13 21:15:02
Subject: Re: BUG #4162: Hotbackup recovery doesn't work in windows
Previous:From: Javier PimásDate: 2008-05-13 20:20:48
Subject: Re: BUG #4162: Hotbackup recovery doesn't work in windows

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