pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nicolas Paris <nicolas.paris@riseup.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: Multiple COPY on the same table
Date: Mon, 20 Aug 2018 17:56:01 +0200
Message-ID: <20180820155601.kkjsvbt7hr7esyag@riseup.net> (raw)
In-Reply-To: <1497638817.10129815.1534776875333@mail.yahoo.com>
References: <1497638817.10129815.1534776875333.ref@mail.yahoo.com>
	<1497638817.10129815.1534776875333@mail.yahoo.com>

> Can I split a large file into multiple files and then run copy using
> each file.  

AFAIK, copy command locks the table[1] while there is no mention of this
in the documentation[2]. 

>  Will the performance boost by close to 4x??

You might be interested in the pbBulkInsert tool[3] that allows parallel
copy with some succes accordingly to benchmarks. However, that tool does
not handle multiline csv. Because of that limitation I have been using
the standard copy command with binary format with some succes.


[1] https://grokbase.com/t/postgresql/pgsql-general/01597pv3qs/copy-locking
[2] https://www.postgresql.org/docs/current/static/sql-copy.html
[3] https://github.com/bytefish/PgBulkInsert




view thread (10+ messages)  latest in thread

Message-ID: <20180820155601.kkjsvbt7hr7esyag@riseup.net>
Permalink:  ../20180820155601.kkjsvbt7hr7esyag@riseup.net/
Also on:    postgresql.org/message-id/20180820155601.kkjsvbt7hr7esyag@riseup.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: nicolas.paris@riseup.net
  Subject: Re: Multiple COPY on the same table
  In-Reply-To: <20180820155601.kkjsvbt7hr7esyag@riseup.net>
  References: <1497638817.10129815.1534776875333.ref@mail.yahoo.com> <1497638817.10129815.1534776875333@mail.yahoo.com> <20180820155601.kkjsvbt7hr7esyag@riseup.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox