Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZxgE2-0000xo-JA for pgsql-bugs@arkaria.postgresql.org; Sat, 14 Nov 2015 19:11:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZxgE2-0008El-5Z for pgsql-bugs@arkaria.postgresql.org; Sat, 14 Nov 2015 19:11:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Zxg5s-0006UK-HO for pgsql-bugs@postgresql.org; Sat, 14 Nov 2015 19:02:36 +0000 Received: from mailrelay113.isp.belgacom.be ([195.238.20.140]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Zxg5p-0000i2-06 for pgsql-bugs@postgresql.org; Sat, 14 Nov 2015 19:02:35 +0000 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BaCQC+hEdW/2m6hW1egztTb69ijFGCGgENgWQhhSVEBAICgSo5FAEBAQEBAQGBCkEBAQMBDAGDYAEBAQQIAh4SHAgbDAEDAgYDEQQBAQEnBxkgDQMBBQgCBBMLBYgiAQi2cAEBAQEBBQEBAQEBAQEBG4ZUhH6JOQWWSAGBIYN7ii6aIR8BAUKCRIFBPTSBPlOBC4IvAQEB Received: from 105.186-133-109.adsl-dyn.isp.belgacom.be (HELO manuw8) ([109.133.186.105]) by relay.proximus.be with ESMTP; 14 Nov 2015 20:02:31 +0100 From: "Manu Joye" To: "'Bruce Momjian'" Cc: References: <20151112195735.9795.39615@wrigleys.postgresql.org> <20151114012402.GC27916@momjian.us> <20151114164733.GA21142@momjian.us> In-Reply-To: <20151114164733.GA21142@momjian.us> Subject: Re: BUG #13774: upgrade from 9.1 to 9.4 'succeeds' without enough disk space Date: Sat, 14 Nov 2015 20:02:09 +0100 Message-ID: <000001d11f0e$f66f7d80$e34e7880$@coopapotheken.be> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKMuFBTsiIr8q3FfkdXTGLaRSrsgQGoMfggAousC26dAw2V8A== Content-Language: nl-be X-Pg-Spam-Score: -2.6 (--) 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 Thanks for the quick fix, Bruce. Much appreciated. 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 + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs