Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gALth-0001Wm-JA for pgsql-general@arkaria.postgresql.org; Wed, 10 Oct 2018 21:20:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gALtf-00025c-JR for pgsql-general@arkaria.postgresql.org; Wed, 10 Oct 2018 21:19:59 +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.89) (envelope-from ) id 1gALtf-00025R-BS for pgsql-general@lists.postgresql.org; Wed, 10 Oct 2018 21:19:59 +0000 Received: from sonic304-12.consmr.mail.bf2.yahoo.com ([74.6.128.35]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gALtd-0000Lg-0L for pgsql-general@postgresql.org; Wed, 10 Oct 2018 21:19:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1539206394; bh=PFcX4ZW5yJwjvg8K+OCgJGxk/ZiMxZaimeovJZ3LnNw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=EGf7szrlLlN4vqAboxExr2kFSjoin7DgK7qA2J1SAXymOztx2uhzfYacD+vgt4zoMbSqfHwjP8l8O54+rXPb4KEbjT7xMB6EMNS5auy9bPgyxkupz6V8YExUnyatSEMGXT4lfIiMVhP+phkR3TW1XfcBKvNIC/ME8vUdFPfLlhH1AkOP2ZZU9dEH8Lb+aasB3bh1DrzbLbNlXXIc9JpZLELt+VuAV8tlCs0PXm5TsPnPHebm1DGVRnnHlI3wsMjOaSEqX0Lck+fGxgl+I4B2gKJGZtSulSXARQyFT5J3oM0469UVl4wH6NI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n0uIARKYDGpS Q1nBSV64Y_g3xsdoVLmBVOaLRQMefHzKT79KaRG4GXdoV48RTVUeeCYfZojDjl0qXUQeiljXwFba tFVpPlpgvq7jSJnEf_w-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.bf2.yahoo.com with HTTP; Wed, 10 Oct 2018 21:19:53 +0000 Received: from 165.225.39.63 (EHLO [192.168.2.100]) ([165.225.39.63]) by smtp401.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 66c5fd4422781f8d2622c052a54c5fa7; Wed, 10 Oct 2018 21:19:53 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: COPY threads From: Ravi Krishna In-Reply-To: <10F9B024-556C-4C8E-B8F5-9461A4696BCA@anarazel.de> Date: Wed, 10 Oct 2018 17:19:50 -0400 Cc: Christopher Browne , laurenz.albe@cybertec.at, Rob Sargent , PostgreSQL Mailing Lists Content-Transfer-Encoding: quoted-printable Message-Id: <4382AB2D-744F-4A4C-B847-AC3556C2F80E@aol.com> References: <065f5e56-5b25-0ce2-e20b-4305f71b2301@gmail.com> <20181010192440.cdxues44gcvx2sbi@alap3.anarazel.de> <7FCA0163-130B-474D-BE00-3BB5D2E0EC89@aol.com> <20181010210729.ewntjynvutnlgdn2@alap3.anarazel.de> <10F9B024-556C-4C8E-B8F5-9461A4696BCA@anarazel.de> To: Andres Freund X-Mailer: Apple Mail (2.3445.9.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thank you. Let me test it and see the benefit. We have a use case for = this. > On Oct 10, 2018, at 17:18 , Andres Freund wrote: >=20 >=20 >=20 > On October 10, 2018 2:15:19 PM PDT, Ravi Krishna = wrote: >>>=20 >>> pg_restore doesn't take locks on the table for the COPY, it does so >>> because creating the table takes an exclusive lock. >>=20 >>=20 >> Interesting. I seem to recollect reading here that I can't have >> concurrent COPY on the same table because of the lock. >> To give an example: >>=20 >> If I have a large file with say 400 million rows, can I first split = it >> into 10 files of 40 million rows each and then fire up 10 different >> COPY sessions , each reading from a split file, but copying into the >> same table. I thought not. It will be great if we can do this. >=20 > Yes, you can. >=20 > Andres > --=20 > Sent from my Android device with K-9 Mail. Please excuse my brevity.