Re: BUG #13774: upgrade from 9.1 to 9.4 'succeeds' without enough disk space

From: 'Bruce Momjian' <bruce(at)momjian(dot)us>
To: Manu Joye <manu(dot)joye(at)coopapotheken(dot)be>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13774: upgrade from 9.1 to 9.4 'succeeds' without enough disk space
Date: 2015-11-14 21:30:10
Message-ID: 20151114213010.GC21142@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Nov 14, 2015 at 08:02:09PM +0100, Manu Joye wrote:
> Thanks for the quick fix, Bruce. Much appreciated.

I am a little worried that bug might have masked other pg_upgrade
Windows copy failures. I am glad you were able to see the problem so
clearly.

---------------------------------------------------------------------------

>
> Manu
>
> -----Original Message-----
> From: Bruce Momjian [mailto:bruce(at)momjian(dot)us]
> Sent: zaterdag 14 november 2015 17:48
> To: manu(at)coopapotheken(dot)be
> Cc: pgsql-bugs(at)postgresql(dot)org
> Subject: Re: [BUGS] BUG #13774: upgrade from 9.1 to 9.4 'succeeds' without
> enough disk space
>
> On Fri, Nov 13, 2015 at 08:24:02PM -0500, Bruce Momjian wrote:
> > Thank you for the report. This is embarrassing, but the code was
> > testing for the wrong return value on Windows. We used a macro to
> > define the same symbol on Windows and Unix (pg_copy_file), but for
> > Windows, we should have been testing for zero, while the code only
> > tested for a -1 return failure. You can see the Windows failure zero
> > return value defined here:
> >
> >
> > https://msdn.microsoft.com/en-us/library/windows/desktop/aa363851%28v=
> > vs.85%29.aspx
> >
> > Return value
> >
> > If the function succeeds, the return value is nonzero.
> > If the function fails, the return value is zero. To get extended
> error
> > information, call GetLastError.
> >
> > We do something similar for hard links, but we create a wrapper
> > function to return the proper value (-1), and we call it twice, so it
> > seems wise to keep that unchanged.
> >
> > The attached patch fixes this and will be applied to all active
> > branches in the next minor release. Sorry for the bug.
>
> Patch applied and backpatched through 9.1.
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + As you are, so once was I. As I am, so you will be. +
> + Roman grave inscription +
>

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Roman grave inscription +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message ofir.manor 2015-11-15 13:40:52 Re: BUG #13725: Logical Decoding - wrong results with large transactions and unfortunate timing
Previous Message Manu Joye 2015-11-14 19:02:09 Re: BUG #13774: upgrade from 9.1 to 9.4 'succeeds' without enough disk space