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 1hvuZl-0008GO-FF for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Aug 2019 02:24:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hvuZk-0007BH-3y for pgsql-bugs@arkaria.postgresql.org; Fri, 09 Aug 2019 02:24:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hvuZj-0007AM-LE for pgsql-bugs@lists.postgresql.org; Fri, 09 Aug 2019 02:24:15 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1hvuZh-0000WY-1d for pgsql-bugs@lists.postgresql.org; Fri, 09 Aug 2019 02:24:14 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 48059220EB; Thu, 8 Aug 2019 22:24:12 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 08 Aug 2019 22:24:12 -0400 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=fm2; bh=vYTU1kRzZKTyPC3t5h4QgDSwI2k Dm5YUCDyrXKKlsvA=; b=HQPdsGCJCzrziIxW3PcARTALw0vNGxS7uQCfc/WGNHW 3uJl6ROghVTL26Chx5QMMS0ph2MhwvWAn/YPbx/TKUawVXaNsX486+XdnblKB9l0 IMtzfcXwYfjgIKNfyIFjxGE6kWBA9riqsf+eLF/hkJPWBXT/eCP+KPwTTU/M/3Ly dKMVK7+gHQ1pHQAMp+QQU9TDE3IuJdv8eK/YgBHen5UECsOOmlic7J//Nh/4/aDf v6GQwRP0JLCKuYKi7rtdUDXyGWnokOlXoVeoiPtz+RkafVSXnelWWrexHSzyOLqC vL1I+JulwjcjUZhG8xQlhtf4iBIA5jVxLv2Wwqkxsng== 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=fm3; bh=vYTU1k RzZKTyPC3t5h4QgDSwI2kDm5YUCDyrXKKlsvA=; b=lwC2pcJF+SCdJFz6QdY8P+ PbkUpUQlwL6PbsHk7lrrqG4908PwlJSNW8qJuUqvPkaXoTpYnBI1GEbJvsz9KHd4 Ngi7QXtOfL2RfU5YDYShWNGcZifdxcctpB+VWJPgYKg0YqcdiLvg+YpZuQoOULqU ma9KPaNCkv6P9WzZAayb9nmdGZlQOTl9uNoYVxd9EjIuhc6xdpa9Ltv7mUe6/Kmq +XzQhDvkWdLMVGSVtpMTJBIp7HLBydWQfuODKztSsQdV2veRmtBd76epQyL7gMq1 nXyHNozQWVtbP3DON+U4cjpTnIWQp7WuuWqoEAev8E6FVivmtr0al43ghFt+GT3A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudduiedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecu kfhppeduudekrddvgedurddvgeekrddugeehnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmihgthhgrvghlsehprghquhhivghrrdighiiinecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (mp76f1f891.ap.nuro.jp [118.241.248.145]) by mail.messagingengine.com (Postfix) with ESMTPA id 96BC1380083; Thu, 8 Aug 2019 22:24:09 -0400 (EDT) Date: Fri, 9 Aug 2019 11:24:05 +0900 From: Michael Paquier To: Andrew Zimmerman Cc: "pgsql-bugs@lists.postgresql.org" Subject: Re: Error in COPY command with files over 1GB Message-ID: <20190809022405.GD3194@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="q9KOos5vDmpwPx9o" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --q9KOos5vDmpwPx9o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Aug 08, 2019 at 04:30:00PM +0000, Andrew Zimmerman wrote: > I am getting the following error when importing from a tab-delimited text file longer than 1 GB. > ERROR: could not stat file "C:\ABC Software\Database Export\Data\invoice_detail.data": Unknown error > Splitting the tab-delimited file into multiple files less than 1 GB and COPY'ing them individually works correctly. > I tested on both versions 11.2 and 11.4 on Windows with the same result. This relates to the fact that Windows does not offer an easy way to stat() correctly files which are more than 2GB, as the struct stat is built with a 4-byte size field. There has been some work on that lately (quoting Tom from a recent mail): https://www.postgresql.org/message-id/flat/1803D792815FC24D871C00D17AE95905CF5099%40g01jpexmbkw24 However there is no way that a complex patch would get back-patched, and that's what we were heading to in the latest discussions I recall on the matter. -- Michael --q9KOos5vDmpwPx9o Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl1M2UUACgkQnvQgOdby QH1rshAAj0SeBKdr3lI40KFoKiSKBqFRUygwvMlPhMhuTu+yda0FE7e85ucHOZB2 2cNwJX0uvDoi5fgurhbBy3TWrHbQlL6Ml2YZRDfQmEOOlSTPgzWi05Wl6J0I+NU7 s2LLVpc0HWqHz8BgZYBuANWG70q4gVEAB/zQ7MUeG/dT96NFN17ECiQ4LVucRS+t hFOr9h3PbqKTP8AKerF0PBXmmBNSt/lVZGWqRYDa2n6xzHQSv38lBxwkAJTnHupl oRnRabbTs5EUl9RpjTdKCbzxOtklNt9SfB0fFhJ1ORtHkrArsGi55wU1zoAk625B 6Llk2H/wfrXXUENQYOQEcDV55utkdX+D0RDlJbnmjRcuH0ueSDy3Ddw2aiGi6PqE sFr4o5rT9ek4Y1ScSlzCCxOCc84niTCkSw7vNfYjbcLg5CxkBeExGx1SSZYJCMey uZgEpIVOCVptZHtQI67AiWYEwv8Y54EqNMPEVU2PgSN9fHzANbTy1Bn23EnnBBdX HIgDb1+XZMX2PGAM/aMDpJMpg9LripgKmWKMiLGsirX7DWqJOMq/VLnaYKAZrP2B EleddKTH3KrRMGU2rHSOTdZvSBRO7Cb+B5S4QzYb910hUWlBM1ogiZqHmpsds/7x ridjxdBb8+tLbdUnHtW632MJCQh8g+R7vmL/safZAq/TEsRowtk= =Xx/m -----END PGP SIGNATURE----- --q9KOos5vDmpwPx9o--