Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZxiPU-0007vO-Ed for pgsql-bugs@arkaria.postgresql.org; Sat, 14 Nov 2015 21:31:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZxiPT-0000ro-9x for pgsql-bugs@arkaria.postgresql.org; Sat, 14 Nov 2015 21:30:59 +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 1ZxiOq-00009I-HG for pgsql-bugs@postgresql.org; Sat, 14 Nov 2015 21:30:20 +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 1ZxiOj-0003BN-0Z for pgsql-bugs@postgresql.org; Sat, 14 Nov 2015 21:30:19 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1ZxiOg-0005Xs-6r; Sat, 14 Nov 2015 16:30:10 -0500 Date: Sat, 14 Nov 2015 16:30:10 -0500 From: 'Bruce Momjian' To: Manu Joye Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13774: upgrade from 9.1 to 9.4 'succeeds' without enough disk space Message-ID: <20151114213010.GC21142@momjian.us> References: <20151112195735.9795.39615@wrigleys.postgresql.org> <20151114012402.GC27916@momjian.us> <20151114164733.GA21142@momjian.us> <000001d11f0e$f66f7d80$e34e7880$@coopapotheken.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000001d11f0e$f66f7d80$e34e7880$@coopapotheken.be> 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 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@momjian.us] > Sent: zaterdag 14 november 2015 17:48 > To: manu@coopapotheken.be > Cc: pgsql-bugs@postgresql.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 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 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