Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZxdzH-0002RY-5m for pgsql-bugs@arkaria.postgresql.org; Sat, 14 Nov 2015 16:47:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZxdzG-0001j8-OP for pgsql-bugs@arkaria.postgresql.org; Sat, 14 Nov 2015 16:47:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZxdzG-0001dj-CO for pgsql-bugs@postgresql.org; Sat, 14 Nov 2015 16:47:38 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZxdzD-0005vp-Fl for pgsql-bugs@postgresql.org; Sat, 14 Nov 2015 16:47:37 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1ZxdzB-0000hO-Hw; Sat, 14 Nov 2015 11:47:33 -0500 Date: Sat, 14 Nov 2015 11:47:33 -0500 From: Bruce Momjian 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 Message-ID: <20151114164733.GA21142@momjian.us> References: <20151112195735.9795.39615@wrigleys.postgresql.org> <20151114012402.GC27916@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151114012402.GC27916@momjian.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 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