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 1iHm6m-0003II-U9 for pgsql-general@arkaria.postgresql.org; Tue, 08 Oct 2019 09:48:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iHm6l-0004Rf-KB for pgsql-general@arkaria.postgresql.org; Tue, 08 Oct 2019 09:48:43 +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 1iHm6l-0004RM-9j for pgsql-general@lists.postgresql.org; Tue, 08 Oct 2019 09:48:43 +0000 Received: from serveurmail01.codata.be ([82.146.123.190]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iHm64-0002QX-D5 for pgsql-general@postgresql.org; Tue, 08 Oct 2019 09:48:42 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by serveurmail01.codata.be (Postfix) with ESMTP id 290EE900C9; Tue, 8 Oct 2019 11:47:59 +0200 (CEST) X-Virus-Scanned: amavisd-new at serveurmail01.codata.be Received: from serveurmail01.codata.be ([127.0.0.1]) by localhost (serveurmail01.codata.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FajVAdm4PvyZ; Tue, 8 Oct 2019 11:47:58 +0200 (CEST) Received: from [10.0.0.100] (38-179-112-217.fix.adsl.belcenter.be [217.112.179.38]) by serveurmail01.codata.be (Postfix) with ESMTPSA id 21D4A900B8; Tue, 8 Oct 2019 11:47:58 +0200 (CEST) Reply-To: arnaud.listes@codata.eu Subject: Re: psql \copy hanging To: Pavel Stehule Cc: Adrian Klaver , pgsql-general References: <9e9164df-e7b7-bcd3-538a-7714907f7df4@aklaver.com> <171491de-b8e1-7f0d-0724-4d06a7902cc0@codata.eu> <291938b2-5816-5858-065f-e85387def0eb@aklaver.com> <230d9c65-450f-b97c-7ef0-c8e9a85103f6@codata.eu> <8f921914-178e-b520-7f93-dab80ea02555@aklaver.com> From: "Arnaud L." Message-ID: Date: Tue, 8 Oct 2019 11:47:56 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Le 08/10/2019 à 09:28, Pavel Stehule a écrit : > you can write simple C application with COPY API > https://www.postgresql.org/docs/12/libpq-copy.html Unfortunately, I don't know C. > Then you can eliminate or ensure locality of problem. > > more, you can use server side copy. Superuser can read data from server > file system. Yes, but in this case the file has to be written to a network share, and the windows user under wich PostgreSQL runs (Network Service) cannot be given write permission on this share. That's the reason for the use of \copy. Now that I think about it, *maybe* this started happening after a server upgrade. Since this is intermittent, I'm not really sure about this, but some time ago we moved our server to a different hardware and upgraded from 9.3 to 11 at the same time. The dates don't perfectly match though, we upgraded around 8th of august and the problem arose ~2 weeks later for the first time. The client was upgraded around that same time period (not exactly the same time if I remember correctly). Regards -- Arnaud