From: Bruce Momjian <bruce@momjian.us>
To: manu@coopapotheken.be
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13774: upgrade from 9.1 to 9.4 'succeeds' without enough disk space
Date: Sat, 14 Nov 2015 11:47:33 -0500
Message-ID: <20151114164733.GA21142@momjian.us> (raw)
In-Reply-To: <20151114012402.GC27916@momjian.us>
References: <20151112195735.9795.39615@wrigleys.postgresql.org>
<20151114012402.GC27916@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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@momjian.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 +
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: bruce@momjian.us, manu@coopapotheken.be
Subject: Re: BUG #13774: upgrade from 9.1 to 9.4 'succeeds' without enough disk space
In-Reply-To: <20151114164733.GA21142@momjian.us>
References: <20151112195735.9795.39615@wrigleys.postgresql.org> <20151114012402.GC27916@momjian.us> <20151114164733.GA21142@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox