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 1i0nkm-0007U2-0l for pgsql-general@arkaria.postgresql.org; Thu, 22 Aug 2019 14:07:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i0nkk-0002Po-QA for pgsql-general@arkaria.postgresql.org; Thu, 22 Aug 2019 14:07:50 +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 1i0nkk-0002Ph-Cn for pgsql-general@lists.postgresql.org; Thu, 22 Aug 2019 14:07:50 +0000 Received: from serveurmail01.codata.be ([82.146.123.190]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1i0nkh-00059p-A5 for pgsql-general@postgresql.org; Thu, 22 Aug 2019 14:07:49 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by serveurmail01.codata.be (Postfix) with ESMTP id D5C13900CC; Thu, 22 Aug 2019 16:07:44 +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 BEh-5sl-kuyv; Thu, 22 Aug 2019 16:07:44 +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 F39F3900C0; Thu, 22 Aug 2019 16:07:43 +0200 (CEST) Reply-To: arnaud.listes@codata.eu Subject: Re: psql \copy hanging To: Adrian Klaver , pgsql-general@postgresql.org References: From: "Arnaud L." Message-ID: <87b0474a-cd95-c983-08f9-5eef3bf50aed@codata.eu> Date: Thu, 22 Aug 2019 16:07:43 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Le 22/08/2019 à 16:00, Adrian Klaver a écrit : > The first thing I think of when seeing this sort of behavior on Windows > is anti-virus software. Doing you have any running on the machine? > > You say it always hangs on the same line. Is that line doing something > different from the others? Say writing to a different location. Thanks for your insights Adrian. There is no AV software on the machine as it is a Server version of Windows. (I know some people run AV on Windows Server, but I don't) All the lines write to the same location which is a network share, but the hanging one is clearly the longest query to execute and the output file is one of the biggest one (though not the biggest). Note that the share points to a local folder. The fact the psql writes to a share is only for robustness so that this script could be executed from any machine. Cheers -- Arnaud