Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyQJx-0006fD-SC for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Feb 2019 00:10:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gyQJw-0000QD-KR for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Feb 2019 00:10:04 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyQJv-0000Q5-Ki for pgsql-bugs@lists.postgresql.org; Tue, 26 Feb 2019 00:10:04 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyQJs-0006xa-MQ for pgsql-bugs@lists.postgresql.org; Tue, 26 Feb 2019 00:10:03 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2706622EC5; Mon, 25 Feb 2019 19:09:59 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 25 Feb 2019 19:09:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=wq0V6bkAXgGfpCNmDHRiz90EEVE 69XcgpngmNn8KeW4=; b=FtmGLwAwY9Ve5dLkHrPQS2jS6FPhuGQix+K7+RJT6Lp QxjK5aKJWDR/tsvGgb7YiWSgb5mu/D5pxTRDms0G6htDLM/S4iky+CGMGkrl0ydq UAZ73lNxIVhhBCaIiio23BXNRcejz5LL9lNDBmdS6pTq92jZFIwhl4rzC3y3hEl8 ObIylOG4tJF3gbL/d527GM04Ys+g+lPGCIHlaZn1O0Mc2MxG0axzPvt5WgF7Dto8 1sSt0igDQiGH25NXFlW/E3rlIs3Jh5XUcvi1JuTDIbb+hojfablsTarRxzxeWXld OHSI6zyRnlRpe6G6hjW0SDCTnAy1Oxa3pItiVWJm7lg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=wq0V6b kAXgGfpCNmDHRiz90EEVE69XcgpngmNn8KeW4=; b=fA/+MhlZZe9rI6EfB9NgIo RfXm8oJcvEru8LvroX3wia2OYY8B8Q+D5Q5VSI0gG8JB7htRTC7Sp85KubtWpyLe 4KIkNrSe1DSfzNkCL5JfkDWEq6pf/QOV4N79Z6NoTDds+Jdiw8DZVwJqFqSQDraG Zt3CUp6r5r7zhje8xn8pU2PcSt+0cg5VU5cFQDNO2GQR+KqDhpW/ODefv2q3FGQv SMQUgJymDJ0LJgYJpP2J0MqwpkmMqEHlMil7Vs26IugbtOi4oYOR4C1E8pWQ/NiQ g90/I28pq6p9kLub4b3Nui2amCbdCm0d/rwUTzwx55JDQR+Ot26fgUcAgeH6to1A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrudekgddukeculddtuddrgedtledrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepiedurddvudehrddufeejrdduiedvnecurfgrrhgr mhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiinecuvehluh hsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id E695810331; Mon, 25 Feb 2019 19:09:56 -0500 (EST) Date: Tue, 26 Feb 2019 09:09:53 +0900 From: Michael Paquier To: David Rowley Cc: sandy kumar , PostgreSQL mailing lists Subject: Re: BUG #15654: COPY command not working for 2gb CSV files Message-ID: <20190226000953.GA27822@paquier.xyz> References: <15654-bd233aae1c150270@postgresql.org> <20190225234352.GH30864@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Feb 26, 2019 at 12:52:58PM +1300, David Rowley wrote: > hmm, but we're talking about fstat() not stat(). Perhaps it suffers > from the same issue, but there does not appear to be a macro for > fstat() in win32_port.h therefore likely involves a less complex fix. I thought that was the case, and double-checking pgwin32_safestat() only maps to stat(). Windows has the bad idea to declare _stat, and put the rest of the return results of the different calls of stat() and fstat() into different structures. Anyway, if I recall correctly, you are still going to run into issues if trying to map _stat64 to "struct stat". I have played with this problem for a couple of hours, and this did not finish well because of the define of stat to pgwin32_safestat in port.h. And we likely don't want to have a dedicated pg_stat struct in the full code tree as that's spread to a lot of places. -- Michael --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlx0g9EACgkQnvQgOdby QH0OnA/9FtYEimryfZBKzaifJ2WjthkBlFDxsn3oj1JFD88bCP/HolNvu99q0SOZ e6l2zgFrCS9D1gnRrC33qrYNCzZt9sE2z0mPhVr572lQ+NPqD30efCagRm9OBzDU e0fAX0lyoyHtAePiw3R2V4WIrhNZhYtAGid79KbhU7vi5hvYu74kLcDZNXARxL83 Lh5FRu/r1WKUQjYyar0+4y4C3o/coCUBtvQFqzB2O7Al0sj0aDDmIfMuxRmE82C5 a6bgsG69BR4Tn418j7CaQKV68TA4CEUnmMyB7lKGsGj5h0es0LFAhfnc+JwHTBPe In5a4SYDe3rblDJfNokPEFkJ2KiQcjtidiR4XIaj9OhVKwT1ChateA13i++d5+dx +At57jfzP9me03iyInoUzpEsDbSGa+poCxyCRgVCVLvLjx5uHNTEVF1IhTcmWN5m +KJusJQP+u+P9i78g/Sp2Wg1odlIdhbkNvq/oahkJNjkfm5E7da5SyaJfNCBXT5D WgdsL1aZO0NbhcC73TbV6OZjeIgU2yizsBZbD6xvvr1ewDlNUt2LxPtA5kmyM1vw sCC7jii1C4CiBZnJFlFnkzrm+Z2PeeRR/5qJAvyL7Y05gAyPZwTcbWYdSK30Q1Kz b5idCN/lT/R/yWzVybySe4DVmyGEkBgHCDBLUgh9G9O/vsm8AcQ= =ugLP -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5--